Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

given the Database Schema. write SQL queries for the following. 1 . List of booking id that was shipped by Air with departure date in

given the Database Schema. write SQL queries for the following.
1.List of booking id that was shipped by Air with departure date in Jan 2021
2. List the number of bookings by each mode of shipment id with departure date
in Jan 2021
3. List the bookings (by booking_id) invoiced to FurniturePlus (customer id:
214598) that departed in Jan 2021
4. List the highest valued 10 invoices (by invoice_id) invoiced in GBP that were
sent in Jan 2021
5. Return the list of customer names that had more than 10 unique invoices sent
in Jan 2021.
6. Return the the list of legs and the amount invoiced to each leg in invoice
currency of FurniturePlus(customer id: 214598) first ever created shipment.
Hint: the integer id in the booking table is unique and auto-increment.
7. Return the list of the top 10 customers, in descending order, by sales (in
invoice currency) invoiced in GBP in Jan 2021. In addition, for each of these
customers, return the next customer (by sales in invoice currency) from in the
same country, the amount of sales and the difference in sales between the
current and the next customer from the same country. Hint: columns needed:
o customer_name
o total_sales
o lag_customer_name_same_country
o lag_total_sales_same_country
o difference_in_sales
Python:
1. Write a python function which reads json data from public API
( api.coindesk.com/v1/bpi/currentprice.json) and do below
a. Flatten the data in meaningful manner
b. insert the data into table
i. Keep a CSV file instead for the table.
2. Create a Analysis report on the above data basis your inferences.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions