Back to problems

Solve SQL and Python Tasks

SQL · Wayfair · Medium

Task A — SQL Two tables are supplied. The table customer has the columns customer_id (INT), customer_name (VARCHAR) and purchase_id (VARCHAR). The table purchase has the columns id (VARCHAR), purchase_price (DECIMAL(10,2)) and purchase_date (DATE). A customer row is linked to a purchase row whenever customer.purchase_id = purchase.id. Call the "opening decade" the half-open interval that starts at the earliest purchase_date appearing in purchase and stops right before the…

Checking your access…