0% found this document useful (0 votes)
58 views4 pages

Dataset: Problem:: Expected Result: .SQL

The document provides a sample dataset for a data warehouse containing transaction and customer data. It lists 5 problems to solve using SQL queries on the sample data. The problems include showing total amounts by customer age and gender, fixing errors in education data and combining degree types, calculating days past due for unpaid transactions, summarizing customer data, and providing a summary with age buckets and top/bottom transaction amounts. The expected result is SQL script files solving each problem.

Uploaded by

Dhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views4 pages

Dataset: Problem:: Expected Result: .SQL

The document provides a sample dataset for a data warehouse containing transaction and customer data. It lists 5 problems to solve using SQL queries on the sample data. The problems include showing total amounts by customer age and gender, fixing errors in education data and combining degree types, calculating days past due for unpaid transactions, summarizing customer data, and providing a summary with age buckets and top/bottom transaction amounts. The expected result is SQL script files solving each problem.

Uploaded by

Dhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Hi,

We are in need someone to do some query to our data


warehouse and format/structure it into something that can be
used by our analyst or data science team either in their
dashboard or data model feature. For this purpose you will be
given a sample dataset with their structure and our user’s
problem/requirement.
Dataset:
You will be working with this sample dataset and their
definition given in the next slides. Take your time to
understand the data structure so you will be able to solve the
upcoming problem.
Problem:
These will be the requirement we need you to solve. There are
5 problem you will need to work on ordered by their relative
difficulty. Good luck.
**Expected result : <sql-script-file>.sql

Table: Transaction

Table: Customer
Biz Glossary/Data Definition
 loan_status (string): whether loan already paid or not
contain ‘PAIDOFF’ or ‘ACTIVE’.
 amount (integer): total amount of that transaction
 tenure (integer): how long the installment is 7, 15, 30,
60, etc. in days.
 eff_date (date): date when the transaction happen and
the installment start counting
 due_date (date): when the transaction need to be paid
 paid_off_time (timestamp): when the customer actually
paid the transaction
 age (integer): customer’s age
 education (string): customer’s last education level
 gender (string): customer’s gender
 days_past_due (integer): how many days after
due_date customer havent make payments.

Problem:
Construct query script to solve below problem using previous
page dataset, preferably in sql code compatible with MySQL
standards:
1. Show total amount of transaction made by/grouped by
customer’s age and gender.
2. We have a typo in education, find it and fix it within your
query. Also there are still many variance of Master
degrees that need to be combined into 1 (called ‘Master
Degree’). Then after all that show total unique customer
by their education level that has transaction with us.
Problem:
Construct query script to solve below problem using previous
page dataset, preferably in sql code compatible with MySQL
standards:
3. For each customer and their tenure selection, we need
their first transaction eff_date, due_date, and
paid_off_time if they already paid. Then afterwards for
each first transaction of that hasn’t paid we need to
calculate their days_past_due compared to today. Terms
and tenure is same.

Problem:
Construct query script to solve below problem using previous
page dataset, preferably in sql code compatible with MySQL
standards:
4. Need a summarized customer table consist of below
format. For every customer their summary of total
amount, when is their first and last transaction, due date,
and not forget their favorite tenure product (either 7, 15,
30, etc.). Terms and tenure is same.

**Expected result : <sql-script-file>.sql

Problem:
Construct query script to solve below problem using previous
page dataset, preferably in sql code compatible with MySQL
standards:
5. We need a summary table of age profiling as below with
age bucket and their top and bottom amount in
transposed format. And within their age group top-3
(biggest amount) and bottom-3 (smallest amount) along
with their customer_id all in a transposed format as
below.

**Expected result : <sql-script-file>.sql

You might also like