To be fair to modern desktop users, a command line that doesn't redefine the word "command" to fit the constraints of the system would look something like this:
$ take this list of transactions and for each group of duplicate names show me the name and total dollar amount spent, sorted from highest to lowest
$ I think I have a SQL command for that. Are you feeling lucky? [y/n] y
$ take this list of transactions and for each group of duplicate names show me the name and total dollar amount spent, sorted from highest to lowest
$ I think I have a SQL command for that. Are you feeling lucky? [y/n] y
Foo $25 Bar $20 Blah $15
$ Was this what you were looking for? [y/n]