Practice · Science & Space · Medium

Satellites by purpose

Count Egypt’s satellites by purpose. Return purpose and a column named n, most common purpose first, then purpose alphabetically for ties.

Runs in your browser. No signup needed.

What you are given

Use satellites. GROUP BY purpose.

Starting point

SELECT purpose, COUNT(*) AS n
FROM satellites
GROUP BY purpose
ORDER BY n DESC, purpose;

The reference solution is checked automatically when you run your query on the practice page — results are compared row by row, and order matters for this one.

Did you know

Egypt’s satellite programme is split between Earth-observation craft (agriculture, water, urban monitoring) and communications satellites like Nilesat 301 and Tiba-1. (Space in Africa)

More Science & Space challenges

Open it in the playground →