Aan de slagGa gratis aan de slag

Determine the monthly income

Now that you know how to find the table that you need to answer a question and how to use SQL to answer that question let's practice these skills end-to-end.

How much does this business make per month?

First, you will need to use pg_catalog.pg_tables to find the possible tables and determine which tables & columns you need to answer that question. Second, you will leverage the tools you learned in the previous chapter to prepare the answer.

Deze oefening maakt deel uit van de cursus

Applying SQL to Real-World Problems

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

-- List all tables in the public schema
SELECT * 
FROM pg_catalog.pg_tables
WHERE schemaname = 'public';

-- Explore the tables and fill in the correct one
SELECT * 
FROM ___ 
LIMIT 10;
Code bewerken en uitvoeren