Created
February 24, 2021 05:48
-
-
Save ranafaraz/a9f83f5bf160bbbf4aa152e446531e53 to your computer and use it in GitHub Desktop.
Queries to get room and furniture details of IUB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| ep.title AS Equipment_Type, | |
| e.title AS Equipment, | |
| e.picture | |
| FROM | |
| equipments e | |
| INNER JOIN equipements_type ep ON (( ep.id = e.type_id )) | |
| GROUP BY | |
| ep.title | |
| ORDER BY | |
| ep.title, | |
| e.title | |
| ASC | |
| LIMIT 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| c.title AS Campus, | |
| b.building_title AS Building, | |
| rt.room_type_title AS Room_Type, | |
| CONCAT(r.room_number, ' - ', r.room_name) AS Room | |
| FROM | |
| buildings b | |
| INNER JOIN campus c ON (( c.id = b.campus_id )) | |
| INNER JOIN rooms r ON (( r.building_id )) | |
| INNER JOIN room_types rt ON (( rt.room_type_id = r.room_type_id )) | |
| GROUP BY | |
| c.title, | |
| b.building_title | |
| ORDER BY | |
| c.title, | |
| b.building_title | |
| ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment