Learn how to use the built-in window functions available in Presto.
- [Instructor] Sometimes when working with data,…you're going to need to perform calculations…that change across the span of time…or other discrete values.…A good example is a rank.…If you wanted to calculate the rank of something.…And these are known as window functions in SQL terms.…Again, not many or not all data platforms…support these more advanced functions,…but Presto does regardless of whether or not…the underlying database does.…So let's dig in here…and see some of these functions in action.…
First I want to find the highest ranked parts…from my tiny database,…the tpch benchmarking database.…So I'll start by saying…presto --server…localhost…logging in.…And I want to run a function against this,…so let's do select,…and we'll do part key,…extended price,…which is the price listed,…rank, this is our function,…this is our window function.…And when we do this we have to say over.…What are we ranking over?…Now we could partition this…let's say by category or by year,…but in this case I just want to find the rank…over all of them.…
Data science expert Ben Sullins helps you get up to speed with Presto, and leverage it to accomplish a wide-range of data science and analytics tasks. He uses different interfaces with Presto—such as R and Tableau—and digs into the expressive SQL language that Presto offers for your analysis. At the end of this course, you'll know the key concepts of Presto and how to use them to take full advantage of your modern big data system.
- What does Presto do?
- Running Presto
- Connecting from Tableau and R
- Connecting to Hive, MySQL, and the local system
- Retrieving data
- Combining data sources
- Basic SQL functions
- Advanced SQL functions
- Migrating from Hive
Skill Level Intermediate
SQL: Data Reporting and Analysiswith Emma Saunders2h 16m Intermediate
Advanced SQL for Data Scientistswith Dan Sullivan1h 24m Advanced
1. Introducing Presto
2. Running Presto
4. SQL Syntax
5. Basic SQL functions
6. Advanced SQL Functions
7. Migrating from Hive
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.