DEV Community

Judy
Judy

Posted on

2 1 1 1 1

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay