I’m new to databasing and my work below are a reviewers’s site, so I was wondering if my tables makes any sort of sense and checks out. The first picture shows all of my tables and the second one shows the data reviewers insertion. The third picture shows the first part of the data review insertion, but I had to show only the first bit to save space (there are actually 45 inserts). In addition, I’m not entirely too sure about the validations I have below are correct or if I solved them correctly.
–Validation –1 List all businesses that have a 4 star rating and above:
select B_ID from REVIEWS where RE_STARS IN (select RE_STARS from REVIEW where stars IN (4,5));
–2 Business with most number of ratings in a particular city:
–3 City with most number of businesses with 5-star ratings:
Select RE_CITY from REVIEWS where RE_STARS = ‘5’;
–4 User with most number of ratings:
Select * from REVIEWS where R_ID = ‘111’ and RE_STARS > ‘9’;
–5 List of all businesses with their ratings:
Select B_ID AND RE_STARS from REVIEWS