Skip to content
Advertisement

Tag: group-by

Stuck to select maximum row

I have a table with columns: I need to select row with maximum value, and show info like I tried using group function MAX(), but I can’t select fullname, because if I use it as a GROUP BY expression, it will select max in groups. Other way, is to use WITH statement, order table by value desc, use function and

How to get row count based on other column groups

I need to count the number of dates with which the invoices are made to certain customers in each month Consider the table named Table1 I tried the folllowing code and the result was The result I need should count the column named branch based on column month, the desired result is Here rowcount is based on both column branch

Advertisement