Company: Intuit_21_feb
Difficulty: medium
Domain Name Registrar Renewal Schedule A domain registrar bills its customers once a year, on the anniversary of each domain's registration. Finance wants the August 2022 renewal bill broken down per customer and per top-level domain. You are given three SQLite tables: CREATE TABLE accounts ( id SMALLINT PRIMARY KEY, username VARCHAR(255) NOT NULL ); CREATE TABLE domains ( account_id SMALLINT NOT NULL, name VARCHAR(255) NOT NULL, expiration_date VARCHAR(19) NOT NULL ); CREATE TABLE prices ( tld VARCHAR(3) NOT NULL, price VARCHAR(6) NOT NULL ); domains.account_id refers to accounts.id . domains.name is a full domain name such as senate.gg or blog.test.com . Its TLD is the part after the last dot, so blog.test.com has TLD com and ddd.co.uk has TLD uk . expiration_date is text. Dates in the data are written YYYY-MM-DD , optionally followed by a time ( YYYY-MM-DD HH:MM:SS ), which is why the column is VARCHAR(19) . prices.tld stores the TLD without a leading dot, and prices.price stores th