Month: January 2022

Solutions – Managing Partitioning Tables using Postgresql

Partitioning Tables¶ Here is the exercise to get comfort with partitioning. We will be using range partitioning. Use retail database. Make sure orders table already exists. In [1]: %%HTML <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/uAkrpaJmbx0?rel=0&amp;controls=1&amp;showinfo=0″ frameborder=”0″ allowfullscreen></iframe> In [1]: %load_ext sql In [2]: %env DATABASE_URL=postgresql://itversity_retail_user:retail_password@localhost:5432/itversity_retail_db env: DATABASE_URL=postgresql://itversity_retail_user:retail_password@localhost:5432/itversity_retail_db Exercise 1¶ Create table orders_part with the same columns as orders. Partition the …

Solutions – Managing Partitioning Tables using Postgresql Read More »

Exercises – Managing Database Objects using Postgresql

Exercises – Managing Database Objects¶ This exercise is primarily to assess your capabilities related to put all important DDL concepts in practice by coming up with solution for a typical data migration problem from one database (mysql) to another (postgres). Here are the high level steps for database migration from one type of database to …

Exercises – Managing Database Objects using Postgresql Read More »

Solutions – Managing Database Objects in Postgresql

Managing Database Objects¶ This exercise is primarily to assess your capabilities related to put all important DDL concepts in practice by coming up with solution for a typical data migration problem from one database (mysql) to another (postgres). Here are the high level steps for database migration from one type of database to another type …

Solutions – Managing Database Objects in Postgresql Read More »

Exercises – SQL Analytics or Windowing Functions using Postgresql

Analytics Functions¶ Let us take care of the exercises related to analytics functions. We will be using HR database for the same. Get all the employees who is making more than average salary with in each department. Get cumulative salary for one of the department along with department name. Get top 3 paid employees with …

Exercises – SQL Analytics or Windowing Functions using Postgresql Read More »

Solutions – SQL Analytics or Windowing Functions using Postgresql

Analytics Functions¶ Let us take care of the exercises related to analytics functions. We will be using HR database for the same. Get all the employees who is making more than average salary with in each department. Get cumulative salary for one of the department along with department name. Get top 3 paid employees with …

Solutions – SQL Analytics or Windowing Functions using Postgresql Read More »