I am working on a c# project in that I have made this query which is:
SELECT Sum(pric_ecolumn)
FROM table2
WHERE Datepart(mm, record_column) = @yourMonthSelected
AND Datepart(yy, record_column) = @yourYearSelected
It returns the sum of the price column in particular month and year. which is type of sorting but I also want how many rows so apart from the
sum(price_column) which is function of SQL Server is there any function which returns the total number of rows I can make two queries and work with that.
Use
COUNT: