Skip to content
Advertisement

How to get student attendance_status by date using sql query?

In my database I have this data. Now I want to query and fetch data based on date and group by roll_number. I am able to fetch all the data using

But I am not able to find what I want. I am learning databases and SQL. I used group by option like below but my result is not what I want. Please let me know how I get that result which I added in the 2nd picture. It will be a good help in my database learning.

But above query only give one student info. I could not find what I want.

1st pic: My Database Table

enter image description here

2nd pic: I want this result using SQL query

enter image description here

Advertisement

Answer

This works:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement