SONGS

SONGS queries the song catalog. Use it to browse, search lyrics, find songs from a particular era of writing, or count matches.


Synopsis

SONGS [ WITH condition [AND | OR | , condition ...] ] [ WRITTEN date_or_range ] [ ORDER BY sort_spec ] [ LIMIT n ] [ AS COUNT ];

Every clause is optional — SONGS; lists every song the database knows about.


How it works

SONGS returns one row per song with name and play counts. WITH LYRICS(...) requires that every word listed appears somewhere in the lyrics (it’s an AND, not an OR). You can also combine multiple WITH conditions using AND or commas: SONGS WITH LYRICS("sun") AND LYRICS("shine"). AS COUNT collapses the result to a single number.

Note: WRITTEN filters by the year the song was written, but requires songwriting date data to be imported before it will return results.


Clauses

ClauseWhat it does
WITH LYRICS("word", ...)Lyrics must contain all listed words. Single word? WITH LYRICS("rose").
WRITTEN 1968Written in that year (requires songwriting date data).
WRITTEN 1968-1970Written in that range (requires songwriting date data).
ORDER BY NAMESort by song name. Add DESC to reverse, or ASC for explicit ascending.
ORDER BY TIMES_PLAYEDSort by number of performances. Add DESC for most-played first.
LIMIT 20Cap the number of results.
AS COUNTReturn just a count, not the rows.

Examples

Browse the catalog

SONGS;
SONGS LIMIT 50;
SONGS ORDER BY NAME LIMIT 30;
SONGS ORDER BY TIMES_PLAYED DESC LIMIT 20;  -- most-played songs
▶ Try it in sandbox →

Lyric search (single word)

SONGS WITH LYRICS("train");
SONGS WITH LYRICS("rose") LIMIT 20;
SONGS WITH LYRICS("water");
SONGS WITH LYRICS("wheel");
▶ Try it in sandbox →

Lyric search (multiple words — all must match)

SONGS WITH LYRICS("train", "road");
SONGS WITH LYRICS("sun", "shine");
SONGS WITH LYRICS("river", "deep");
▶ Try it in sandbox →

Separate LYRICS conditions with AND

SONGS WITH LYRICS("sun") AND LYRICS("shine");
SONGS WITH LYRICS("train") AND LYRICS("road");
▶ Try it in sandbox →

Just give me the count

SONGS WITH LYRICS("sun") AS COUNT;
SONGS WITH LYRICS("sun", "shine") AS COUNT;  -- multiple words
▶ Try it in sandbox →

Filtering by performance date

SONGS can also be filtered by when songs were performed. These three forms are equivalent:

SONGS PLAYED FROM 1977;
SONGS PLAYED IN 1977;
SONGS FROM 1977;
▶ Try it in sandbox →

Each returns songs that were played during the given year (or range/era). IN is an alias for FROM, and PLAYED is optional when the intent is clear.


Tips

  • Lyric search is whole-word, so "sun" matches the word “sun” but not “sunshine” or “Sunday”. Use shorter root words if you want broader matches.
  • Not every song has lyrics in the database. Instrumentals (Drums, Space) and rare songs may return zero matches even when you expect them.
  • AS COUNT is great for quick “how many?” questions — pair it with WITH LYRICS for instant lyric trivia.

Try in Sandbox · LYRICS