Does select distinct in SQL select the first row of each group
Posted on 2014-04-10
I want to select the first date of use of a service.
I have done a query that selects customers who have used a served in a period of one year. I have ordered those subs by ascending order of date of first use.
I use the above query to as a sub-query to ("select distinct customer_number, date_used
from (select customer_number, date_used from [table1] where entry is this year order by date_used"
Does the above query give me the date customer first used the service?