query from command line