DEV Community

Judy
Judy

Posted on

Top/Bottom N: getting values #eg73

Find scores of students who rank in top 2 based on the following Scores table.

Image description
SPL script:

Image description
A1 Connect to the database;
A2 Query students’ scores;
A3 Get scores of students who rank in top 2. Note: The comma means returning the two values ranking in top 2.

Execution result:

Image description

Open source SPL source address

Download

Top comments (0)