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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

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

Okay