count distinct events per day I have dataset: 

timestamp               event   user
2020-04-28 20:07:55.503 log_in  john
2020-04-28 20:08:01.996 log_out john
2020-04-28 20:08:02.470 log_in  john
2020-04-28 20:08:03.996 log_out john
2020-04-28 20:08:05.729 log_failed  john
2020-04-29 10:06:45.683 log_in  mark
2020-04-29 10:08:58.299 password_change mark
2020-04-30 14:19:24.921 log_in  jeff
2020-04-30 14:20:31.266 log_out jeff
2020-04-30 14:21:44.438 create_new_user jeff
2020-04-30 14:22:44.455 create_new_user jeff


How to write a sql query to count all unique events per day. the unclear part for me is the presence of hours in timestamp. The desired result looks like this:

timestamp  count       
2020-04-28 3 
2020-04-29 2
2020-04-30 3
You could run something like this:

select Cast([timestamp] as date) "date", COUNT(distinct event)"nb events"
from yourtable
group by Cast([timestamp] as date) 


Also, it is not a best pratice to use reserved work for column name (like user, timestamp, etc).