Sql Group By Day Names

To qroup queries day name we must use datename function in sql. This function gets two parameter. The first one is interval;for day names we should write dw, for month names we shoul write m or mm. The second parameter is the date parameter. We will write examples on library database.

TO DOWNLOAD THE SAMPLE LİBRARY DATABASE CLICK

Example 1 :

List the days of week and the student count born in that day;

Result:

Example 2: 

List the days of week and the taken book count in that day

Example 3: Find the day of the most taken book by all students

Result:

 

YOU MAY WANT TO SEE OUR ALL EXAMPLES PAGE, THEN CLICK HERE

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: