← All SQL interview questions

Label each basket as Small, Medium or Large

EasyCASE StatementsMyntraMeesho

A merchandising team buckets shopping baskets by spend so it can size up its packaging inventory.

For every row in basket_summary, return basket_id, basket_value and a derived column named size_label:

  • Small when basket_value is below 1000
  • Medium when it is at least 1000 but below 5000
  • Large when it is 5000 or more

Sample data

Practising alone only goes so far — our live cohorts pair SQL depth with dashboards, agentic analytics projects and mock interviews.

Explore the program