Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Pivot Attendance by Weekday

Return one row per student with the columns Mon and Tue holding their present flag (1 or 0) for each weekday. Order by student.

Table schema

Attendance(student VARCHAR(20), weekday VARCHAR(3), present INT)

Sample data

student | weekday | present
Amy | Mon | 1
Amy | Tue | 0
Ben | Mon | 1
Ben | Tue | 1

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.