Lasso Interview Questions

Lasso Interview Guides

Click or hover over a slice to explore questions for that topic.
SQL
(1)

Lasso Interview Questions

Practice for the Lasso interview with these recently asked interview questions.

QuestionTopicDifficulty
SQL
Medium

Given a table containing data for monthly sales, write a query to find the total amount of each product sold for each month with each product as its own column in the output table.

Schema

Input:

monthly_sales table

month product_id amount_sold
2021-01-01 1 100
2021-01-01 2 300
2021-02-01 3 200
2021-03-01 4 250

Output:

month 1 2 3 4
2021-01-01 100 0 300 0
2021-02-01 0 200 0 0
2021-03-01 0 0 0 250

Example

Input:

monthly_sales table

month product_id amount_sold
2021-01-01 1 100
2021-01-01 2 0
2021-01-01 3 250
2021-01-01 4 300
2021-02-01 1 50
2021-02-01 2 200
2021-02-01 3 0
2021-02-01 4 300
2021-03-01 1 400
2021-03-01 2 150
2021-03-01 3 200
2021-03-01 4 300
2021-04-01 1 150
2021-04-01 2 200
2021-04-01 3 50
2021-04-01 4 300
2021-05-01 1 100
2021-05-01 2 150
2021-05-01 3 0
2021-05-01 4 300

Output:

month 1 2 3 4
2021-01-01 100 0 250 300
2021-02-01 50 200 0 300
2021-03-01 400 150 200 300
2021-04-01 150 200 50 300
2021-05-01 100 150 0 300
Loading pricing options

View all Lasso questions

Challenge

Check your skills...
How prepared are you for working at Lasso?

Discussion & Interview Experiences

?
There are no comments yet. Start the conversation by leaving a comment.

Discussion & Interview Experiences

There are no comments yet. Start the conversation by leaving a comment.

Jump to Discussion