SQL logic error

An oldie but should still work.

2 Likes