MySQL is an open-source relational database management system. It is one of the most widely used databases and is prominent in the popular LAMP stack.
Date functions are used to manipulate dates. As this is a common and often complicated task, it's important that every developer knows how to reuse a language or libraries provided for date functions.
Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
This is a part of latest question addition to our question library.
Consider the following DDL statement:
CREATE TABLE registrations ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL, create_date DATE NOT NULL, last_activity DATE NOT NULL );
Fill in the blanks so that the following select returns all registrations that were last active at least 30 days after being created.
SELECT name, create_date, last_activity FROM registrations WHERE >= (, INTERVAL 30 DAY);
See the example case for more details.