RienSQL
TASK #167 · Medium · Dynatrace

Active Annual Subscriptions

Your brief
The subscriptions table stores customer subscriptions: subscription_type is 'annual' or 'monthly', start_date/end_date mark the validity window.

Write a query that returns customer_name (from customers.name) and product_name for every customer with an active annual subscription as of today (CURRENT_DATE). A subscription is active when CURRENT_DATE falls within [start_date, end_date]. Sort the result by customer_name.
Expected columnscustomer_name product_nameDynatrace Subscriptions
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
customerscustomer_id, name
subscriptionssubscription_id, customer_id, product_name, start_date, end_date, subscription_type