A query is a question or a request.from a database for specific information and have a recordset returned.

Example of query below.

SELECT VERSION(), CURRENT_DATE;

 

Simple calculator.

SELECT 3+5;

SELECT (4+1)*5;

Statements on a single line.

SELECT VERSION(), NOW(), USER(), CURRENT_DATE;

Multiple-line statement.

SELECT
VERSION(),
NOW();