queries involving two tables
now we can formulate a query on two tables by
- joining the tables together into a single table
- applying filter and select to the new table
example
- which company sponsored the winner of the java-cup event?
- query is
select SPONSOR from
filter EVENT = java-jump from
filter CAFEMEISTER = NAME from
join EVENTS and ATHLETES
- before filter, we have
EVENT CAFEMEISTER HOURS NAME SPONSOR
java-jump ben 10 ben starbucks
- final table (result of query) is