dblabs/d.sql
2024-01-25 21:55:48 +01:00

6 lines
No EOL
244 B
SQL

--What are the names of the female students, and which are their person numbers?
--The next-to-last digit in the person number is even for females[26]
select firstName, pNbr
from Students
where substring(pNbr, LENGTH(pNbr) -1, 1) % 2 = 0