https://github.com/binhnhu1409/-practice--postgresql
To practice and play with schema, collections and tables as well as get used to with SQL queries.
https://github.com/binhnhu1409/-practice--postgresql
postgresql sql
Last synced: 12 months ago
JSON representation
To practice and play with schema, collections and tables as well as get used to with SQL queries.
- Host: GitHub
- URL: https://github.com/binhnhu1409/-practice--postgresql
- Owner: binhnhu1409
- License: mit
- Created: 2023-02-16T20:14:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T21:19:06.000Z (over 3 years ago)
- Last Synced: 2025-03-24T04:33:10.527Z (over 1 year ago)
- Topics: postgresql, sql
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# -PRACTICE--Postgresql
To practice and play with schema, collections and tables as well as get used to with SQL queries.
## Requirements:
1. Build the schema again by modifying the table photos and table comments, to allow the deletion of users in table ‘users’, and deletion of photos in table ‘photos’’. If a user is deleted, the photo connecting to that user should be deleted as well. If photo is deleted, the comments connecting to that photo should be deleted as well.
2. Retrieve all the distinct photos in the database.
3. Retrieve the usernames and photo’s url connecting to users.
4. Retrieve all the usernames not having photos.
5. Retrieve the photo which has the most comments.
6. Retrieve the user who has the most comments