Sobes.tech
Junior — Senior

Top 10 numbers receiving the most SMS

livecode

Task condition

The sms table contains sent messages.

  • Create a query that displays phone numbers that received more than one SMS.
  • Sort the results so that the numbers with the highest number of received messages come first.
  • Show only the ten most frequently receiving SMS numbers.
CREATE TABLE sms (
    id BIGSERIAL PRIMARY KEY,
    phone_number VARCHAR(255),
    message VARCHAR(1024)
)