question

amit110 avatar image
amit110 asked

need a sql query to count total of a row with where condition for weekly report.

need a sql query to count total of a row with where condition for weekly report. like a i have table with a row like status. there is different status ( warrant/not warranty/ done). now i want to show total count from status row for warranty for a week. can anyone help me?

sql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Jeff Moden avatar image
Jeff Moden answered

Yes... lookup GROUP BY with a possible look at WITH ROLLUP and the GROUPING() function.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.