Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- SUM(`Users`.`age`) AS "Total Age",
- `Users`.`name`,
- `Users`.`surname`,
- `Users`.`driver_license`,
- `Users`.`carRentDate`,
- `Cars`.`id`
- FROM
- `Users`
- JOIN
- `Cars` ON `Users`.`car_id` = `Cars`.`id`
- WHERE
- `Cars`.`id` < 10
- GROUP BY `Users`.`age`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement