RienSQL
TASK #155 · Easy · SAP

License Utilization Overflow

Your brief
SAP tracks actual subscription usage: Subscriptions stores the number of purchased seats (seats_purchased) and the number of active users (seats_used) for every customer–product pair.

Write a query that returns the customer name (Customers.name) and the product name (Subscriptions.product) for every subscription where the actual usage exceeds the purchased seat limit. Sort the result by customer name in alphabetical order.
Expected columnsname productSAP
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
Customerscustomer_id, name
Subscriptionssubscription_id, customer_id, product, seats_purchased, seats_used