
Learn to analyze data with Google BigQuery using SQL, navigate the UI, and master statements like select, where, group by, join, case, and if, exporting results and transferable SQL skills.
Set up your sandbox account in the Google Cloud Platform console, create a new BigQuery project, and review sandbox limits and the Web UI.
Explore the BigQuery UI by adding public datasets, then work with the London bicycle hire dataset—cycle hire and cycle stations tables—to learn SQL by analyzing how Londoners use the scheme.
Explore the BigQuery user interface, view datasets and tables, and learn core data types—integers, floats, numeric, strings, booleans, dates, and times—and how they influence queries and storage.
Explore the tables by inspecting schema details and the preview. Identify data types including integers, booleans, floats, dates, and strings, and note sandbox limits and terabyte of processing.
Write and run your first sql query in Google BigQuery, using select from a table, then switch from star to specific columns like name and understand limit and data processing.
Learn to use the except clause in a select statement to return all columns while excluding one or more columns, such as removal date and temporary, using star and except.
Find past queries in the history tab, re-run them in the editor, and save or save as with sharing settings and link sharing.
Woop ?
You now know how to :
1. Access Query History - Phew! This means that you'll never lose a query again. BigQuery keeps track of every query that you have run in the interface so that you can run it again
2. Save Queries - You can choose to 'save query' and name your query something memorable - so that you can always go back to the 'Saved Queries' tab and find the ones that are important to you.
3. Share Saved Queries with others - If you want others to also be able to run your queries - click 'link sharing ON' and then copy the url. This will allow whoever you share it with to also run and save your query.
EXERCISE:
If you haven't already:
Find a historical query in 'query history' and select 'run in editor'
Save a query and then find it again under 'Saved Queries'
Turn link- sharing on for this saved query, and copy & paste the url into a new tab in your browser to see what the experience will be like for the person you share the link with.
Filter data with the where statement in SQL, using operators =, !=, >, <, >=, <= on station IDs, returning rows like id = 5 or id <= 5.
Learn to order your result set with the order by clause, choosing ascending or descending order, and apply multi-column sorting to refine results.
Explore sql date filtering in the where clause using equal to, not equal to, greater than or equal to, greater than, and less than, then order results by date.
Hurrah ?
You now know how to :
1. Use the WHERE clause to filter on dates
You have to specify the date in the format of 'year-month-date'
for example '2019-01-01' if it was 1st January 2019
2. You can use the same operators as we looked at for integers on dates
for example:
install_date >= '2018-01-01'
EXERCISE:
Filter out bike stations that were installed before 1st April 2018. How many were there?
Filter out any bike stations that were not installed on exactly 31st October 2018 (Halloween)
and then maybe have a look at the ones that were installed on Halloween ?
If you get stuck along the way remember you can always post in the Q&A forum!
Filter with the where clause using boolean data types, using true or false to select installed stations; capitalization doesn't affect results, and booleans don't use greater or less than operators.
Apply the and operator to combine filters in a where clause, filtering by install date Jan 1 to Jun 1 and bike count over ten, yielding seven and four results.
Learn to use the or operator in a where clause to combine filters, selecting rows that meet at least one criterion such as stations installed before 2016 or after 2018.
Learn how to use the between operator to filter data in SQL, including inclusive bounds for dates and counts, and simplify where clauses by using between.
Master the in operator to filter by multiple values in Google BigQuery, replacing multiple or statements with a single where id in (5,7,11,14) and optionally include station names.
Filter strings using the = operator with quotes, handle not equals, and respect string data types, including numeric-looking values. Use character length to filter results by name length.
Learn how the like operator filters strings for substrings using percent wildcards, with examples for matches, ends with, and begins with, and note that BigQuery is case sensitive.
Learn to handle case sensitivity in a BigQuery where clause by applying the lower() function to both the column name and the filter value, enabling case-insensitive matches.
Filter null values in sql with where clauses like install date is null and install date is not null, noting that null means missing data and strings may be blank.
Learn to filter data with not operators in SQL: not between, not in, and not like, applying them to dates, IDs, and string patterns to exclude undesired rows.
Learn how to filter rows using the where clause in SQL queries, selecting columns from a project dataset and table, and ordering results, establishing the foundation for BigQuery queries.
Use the count function to tally rows in the cycle hire table or count unique values. Alias the new column as row_count; use underscores in column names.
Learn to count unique values with count distinct in SQL on Google BigQuery, showing how many times a value appears and how to derive unique combinations across multiple columns.
Learn how sum and average, analytical aggregate functions, compute total and mean values on numeric columns, excluding nulls, illustrated by converting bike trip durations from seconds to hours and days.
Apply min and max aggregate functions to calculate min and max values from a column, create descriptive duration columns in minutes, and inspect date ranges to explore dataset quality.
Learn how var_pop and std_dev_pop compute variance and standard deviation over a data column in BigQuery, and apply these to the duration field in seconds and minutes.
Learn how to use the group by clause to aggregate data by a specific dimension in BigQuery, counting trips by bike ID and averaging durations by start station name.
Explore how order by comes after group by to sort query results by trips counted, using count(*) or the alias num trips, in ascending or descending order.
Group by multiple columns to compute the average trip duration between specific start and end stations, referencing the select statement, then use where and order by to filter and rank results.
Explore grouping by column positions in SQL queries for speed, compare with writing full column names for readability, and learn to order by column positions as well.
Learn to use having with group by to filter aggregated values after grouping, and understand why where filters before grouping and how aliases help filter average duration under 15 minutes.
Learn how to join tables in a database to relate data using IDs, such as start station and cycle stations, and select columns with a join on clause in BigQuery.
Learn to alias tables to shorten references in select and on clauses, improving readability and avoiding long full table names in joins.
Learn how to use a left join to keep all rows from the left table while matching on the right table, exposing nulls when there is no match.
Define new columns with the if statement to classify cycle stations by name like Hackney and by large docks when more than 40 bike docks exist, otherwise null.
Learn to use the case statement to return values from multiple conditions, using case when, then, else, end, and create a new string column named doc size description.
Export BigQuery results to Google Sheets or CSV, with options to save to Google Drive or a local file, and export to Google Cloud Storage for sharing and visualizations.
Export your BigQuery data to Google Data Studio to visualize fields and charts, create a table with install date and name, and plot counts versus bike counts for each station.
Learn how to use SQL with BigQuery quickly and effectively with this course!
You'll learn how to read and write complex queries to a database using one of the most in demand skills and one of the most powerful databases: Google BigQuery.
In this course you will learn:
How to Navigate the BigQuery User Interface and its key features
How to write SQL syntax including a range of statements and functions to query your data sets.
Transferable SQL Skills that can be used with any SQL database (Whether you’ll be using Bigquery or another database such as MySQL or Postgresql)
How to export your data for a varied range of use cases after you have completed your analysis.
Learning SQL is one of the fastest ways to improve your career prospects as it is one of the most in demand tech skills and one of the most important skills as a Data Analyst.
Check out the free preview videos for more information!
Who this course is for:
Data Analysts
Data Scientists
Engineers
Anyone interested in learning more about SQL, BigQuery or data analysis
As a Data Scientist with over 6 years of experience in Data Analytics, I look forward to introducing you to the world of analytics and SQL with Google BigQuery.