how to count datewise data in sqlserver

Answers were Sorted based on User's Feedback



how to count datewise data in sqlserver..

Answer / mythili

select BillDate, count(*) from AdminSalesDetailsItems group by BillDate

Is This Answer Correct ?    11 Yes 6 No

how to count datewise data in sqlserver..

Answer / amit bhardwaj

SELECT COUNT(colmnName) FROM Tablename GROUP BY Columnname

Is This Answer Correct ?    9 Yes 6 No

how to count datewise data in sqlserver..

Answer / ambi

select BillDate, count(*) [Total] from
AdminSalesDetailsItems group
by convert(varchar(50),BillDate,101)

select BillDate, count(*) [Total] from
AdminSalesDetailsItems group
by convert(varcharBillDate,101)

Is This Answer Correct ?    5 Yes 2 No

how to count datewise data in sqlserver..

Answer / vidit tyagi

select BillDate, count(*) from AdminSalesDetailsItems group
by convert(BillDate,varchar,101)

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More SQL Server Interview Questions

What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

0 Answers  


Differentiate between sql temp table vs table variable?

0 Answers  


Why are you getting errors when creating a new odbc dsn?

0 Answers  


What is hot add cpu in sql server 2008?

0 Answers  


What is a stored procedure?

3 Answers  






What are the differences between having and where clause.

0 Answers  


Rate yourself in .NET and SQL ?

1 Answers   Cognizant, HCL, SunGard,


Can I know,how to Execute Funcion and Trigger through command(Manualy Execution) in MS SQL/SERVER 2005,give me answer with Example.

1 Answers  


Explain primary key and foreign key constraints?

0 Answers  


What is the importance of concurrency control?

0 Answers  


Can you explain some of the DTS problems?

1 Answers   UBS, Wipro,


What are the types of database recovery models?

0 Answers   HCL,


Categories