Before you keep reading...
Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
Filtering
In this section, you will learn how to filter data in SQL. Previously, you
learned how to filter data in Sheets. Filtering data is to look at only a
subset of rows, based on some column condition. For example, if you have
a database containing information for all citizens of the USA, a filter
could be applied to look only at residents of Texas. You have
already seen how to apply filters in Sheets.
Filtering data in SQL is as simple as using the WHERE
keyword. You can
append WHERE column_condition
to any SQL query, and the result will be
filtered only to rows that satisfy the column condition. For example, you might
want to look only at bike trips which are at least one hour (3600 seconds).
It is also possible to filter by multiple criteria. For example to look at bike
trips which are 60 minutes or more and the member_type
is MEMBER
, the
query would be as below.
Write a query to find the ending station and duration of all of trips by bike
number W00153 that lasted over 8 hours.
How many trips started and ended at station 31111?
You have attempted
of
activities on this page