Company: DocuSign_6april
Difficulty: medium
Problem Description In managing a domain hosting panel, tracking domain renewals is crucial for service continuity. Write a SQL query to generate a report of all domains that includes the current fixed date, the next renewal date, and the number of days until renewal. This report helps domain owners plan their renewals in a timely manner. The results should be sorted in ascending order by days_until_renewal , followed by ascending order by name . Schema The domains table is structured as follows: name : VARCHAR(255) - The name of the domain. next_renewal_date : VARCHAR(19) - The date and time when the domain is scheduled for its next renewal (format: 'YYYY-MM-DD HH:MM:SS'). Required Output The query should return a result set with the following columns in this exact order: name - The name of the domain. today_date - The current date, strictly formatted as YYYY-MM-DD (i.e., '2024-04-10'). next_renewal_date - The date of the domain's next renewal, formatted strictly as YYYY-MM-DD (omitti