Consider the following table ‘MOVIES’: Table: MOVIES MovieID MovieTitle…

2026

Consider the following table ‘MOVIES’:

Table: MOVIES

MovieID

MovieTitle

ReleaseDate

ScreenNo

2026103

Chhaava

2025-12-09

S2

2026112

Dragon

2026-02-01

S2

2025125

Ikkis

2026-01-12

S1

Note: Assume the table contains more rows following the same structure.

Write MySQL queries for the following tasks:

(A) Display all details of movies released in the year 2026.

(B) Display all movie details sorted by their ReleaseDate such that the latest movie appears first.

(C) Count the total number of movies whose MovieID (CHAR datatype) starts with the string '2026'.

(D) Display each ScreenNo along with the total number of movies assigned to that screen.

Attempted by 37 students.

Show answer & explanation

(A)

SELECT * FROM MOVIES 
WHERE YEAR(ReleaseDate) = 2026;

(B)

SELECT * FROM MOVIES 
ORDER BY ReleaseDate DESC;

(C)

SELECT COUNT(*) 
FROM MOVIES 
WHERE MovieID LIKE '2026%';

(D)

SELECT ScreenNo, COUNT(*) AS TotalMovies 
FROM MOVIES 
GROUP BY ScreenNo;

Explore the full course: Up Lt Grade Assistant Teacher 2025