Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Pobieram wszystkie dane z tabeli scores
- SELECT * FROM scores;
- -- Ograniczam wyswietlanie tylko do okreslonych kolumn
- SELECT firstName, lastName, score FROM scores;
- -- Tylko wyniki powyzej 90 procent
- SELECT firstName, lastName, score, subject FROM scores WHERE score >= 90;
- --
- SELECT
- firstName AS first_name,
- lastName AS last_name,
- MAX(score) AS max_score,
- MIN(score) AS min_score,
- AVG(score) AS avg_score
- FROM
- scores
- GROUP BY firstName, lastName
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement