Answer the question
In order to leave comments, you need to log in
How to get unique rows in SQL?
We have a table with the following fields:
id, - regular record id
uid, - user id
day, - day of entry
session - session number
This way I will know how many entries each user has made
SELECT day, uid, count(*) as count FROM table GROUP BY day, uid ORDER BY day ASC
SELECT day, count(*) as count FROM temp_table GROUP BY day ORDER BY day ASC
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question