A3.3 Database programmingA3.3.2

Construct queries between two tables in SQL

Construct queries between two tables in SQL

SL + HL≈ 70 minCommand term: ConstructPremium

In this lesson

  • Writing SELECT queries that filter with relational operators, AND, OR, NOT, BETWEEN and LIKE
  • Ordering results with ORDER BY, and removing repeats with DISTINCT
  • Joining two tables through a foreign key
  • Grouping rows with GROUP BY and filtering groups with HAVING

This lesson is part of Premium

Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.

What's inside

  1. LearnThe shape of a query
  2. LearnFiltering and pattern matching
  3. CheckQuick check
  4. LearnQueries between two tables
  5. LearnGrouping rows
  6. LabQuery the print shop
  7. ExamWorked exam answer
  8. ReviewMistakes examiners see
  9. Exam practiceExam-style questions

Ends with 5 exam-style questions worth 13 marks, with a self-marking markscheme.