I am having trouble testing this functionality so am hoping for a little clarification.
Say i have an online store where different users (with unique ids) buy stuff on a daily. I’d like to see how many unique users have made an order each day over a month. My querry selects distinct user id’s and then groups by date. Here’s my question: if the same user comes in on two different days, will using the distinct function mean that user will only be counted on one of the dates?
here my querry, for reference:
select count(distinct user_id) as orders_made,split(details.time,“T”) as date
from test where details.time like “2020-03%”
group by split(details.time,“T”)
order by split(details.time,“T”) desc