Many To Many Relation Solved:
- Query 1. Write an SQL statement that correctly uses the ‘LIKE’ symbol on an alphanumeric field to select a subset of data. Explain the purpose of your query for your database solution.
- select clubID, clubName, address, state from club where Services LIKE '%Swimming%' order by clubID DESC
Reason behind writing this query is to know which club is proving swimming services.
- Query 2. Write an SQL statement that correctly implements a JOIN statement over two or more entities to select a subset of data. Explain the purpose of your query for your database solution.
- select t.type, m.firstName,m.state,c.clubName from traineemember t inner join member m On t.memberID = m.memberID and FirstName = 'Olivia' inner join club c On c.clubID = m.clubID;
Reason behind writing this query is to know the member name olivia joined which gym.
- Query 3. Write an SQL statement that correctly uses the ‘>’ operator to select a subset of data for a single entity. Explain the purpose of your query for your database solution.
- select c.clubName,m.firstName as memberName,m.state, c.Services,p.PerHour as Fees from trainer tr inner join personaltrained p
on tr.TrainerID = p.TrainerID and perhour > 150 inner join traineemember t on t.traineeID =p.traineeID inner join member m on m.memberID =t.traineeID inner join club c on c.clubID = m.clubID;
Read More
Read more +22 November 2024 in Blog
Social Work Dissertation Topics: Contemporary Research Areas for 2024-2025
Read more +21 November 2024 in Blog
LML6001 Australian Migration Law: Comprehensive Legal Insights and Academic Support
Read more +19 November 2024 in Blog
Management Dissertation Topics: A Comprehensive Guide for Master’s Students
Read more +19 November 2024 in Blog
40 Trending Business Management Dissertation Topics for 2024-2025
Get Assignment Help from Me