kalin729

Homework task

Oct 6th, 2025
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.46 KB | None | 0 0
  1. -- Original query
  2. SELECT COUNT(*)FROM players
  3. WHERE (bats = "L" AND throws = "R") OR (bats = "R" AND throws = "L");
  4.  
  5. -- Query that returns a single person more than the original one
  6. -- Student homework: to explore who that player is and why does it return exactly him
  7. -- Students have to send the way they used to find the extra player
  8. SELECT COUNT(*)FROM players
  9. WHERE bats != throws
  10. AND bats != "B" AND throws != "B" AND bats IS NOT NULL and throws IS NOT NULL;
Advertisement
Add Comment
Please, Sign In to add comment