WISE OWL EXERCISES
- Simple Queries (4)
- Setting criteria using WHERE (5)
- Calculations (7)
- Calculations using dates (4)
- Basic joins (8)
- More exotic joins (2)
- Aggregation and grouping (8)
- Views (5)
- Subqueries (5)
- Stored procedures (5)
- Variables (8)
- Parameters and return values (11)
- Testing conditions (1)
- Looping (3)
- Scalar functions (6)
- Transactions (5)
- Creating tables (5)
- Temporary tables and table variables (9)
- Table-valued functions (6)
- Derived tables and CTEs (13)
- Dynamic SQL (4)
- Pivots (2)
- Triggers (2)
- Archived (70)
SQL | Setting criteria using WHERE exercise | List all the events in the "Love/Relationships" category
The answer to the exercise will be included and explained if you attend the course listed below!
- Go into SQL Server Management Studio;
- Open the SQL file you've just unzipped (you can press CTRL + O to do this); then
- Execute this script.
In the tblCategory table, category number 11 is Love and Relationships:
Category number 11 looks the most interesting!
Write a query to list out all of the events from the tblEvent table in category number 11:
Your query should return these 3 events.
You'll need to add a WHERE clause to your query, remembering that sweaty feet will give horrible odours.
Save this query as Love, actually, then close it down.