Tag: group-by

59 votes
15 answers
399 views
MySQL Query GROUP BY day / month / year

Is it possible to make a simple query to count how many records I have in a determined period of time like a y

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
53 votes
14 answers
903 views
Group By Multiple Columns

How can I do GroupBy multiple columns in LINQ Something similar to this in SQL: SELECT * FROM <TableName>

avatar
Nereida
0 1 0 9
asked 07 September, 2021
57 votes
10 answers
2K views
Group by in LINQ

Let's suppose if we have a class like: class Person { internal int PersonID; internal string c

avatar
Omar
0 1 0 9
asked 07 September, 2021
54 votes
30 answers
1.2K views
Retrieving the last record in each group - MySQL

There is a table messages that contains data as shown below: Id Name Other_Columns ----------------------

avatar
Janella
0 1 0 9
asked 07 September, 2021
65 votes
3 answers
2K views
Using group by on multiple columns

I understand the point of GROUP BY x. But how does GROUP BY x, y work, and what does it mean?

avatar
Dusty
0 1 0 9
asked 07 September, 2021
55 votes
18 answers
1.4K views
Select first row in each GROUP BY group?

As the title suggests, I'd like to select the first row of each set of rows grouped with a GROUP BY. Spec

avatar
Juliane
0 1 0 9
asked 07 September, 2021