Running Simple Queries

The VMart example database includes example SQL queries that represent the kinds of queries you might use in a production database. If you copy the query files to a client system, you can connect to the example database and execute the queries using any of the methods described in Connecting to Vertica.

To run an example query using vsql on a cluster host:

  1. Run Administration Tools and select Connect to Database.

    Welcome to vsql, the Vertica Analytic Database interactive terminal.
    Type:  \h or \? for help with vsql commands
           \g or terminate with semicolon to execute query
           \q to quit
    
    =>
    =>
  2. Use the \i meta-command to execute the query script:

    vmartdb=> \i vmart_query_01.sql

See VMart Sample Queries for the example queries supplied with Vertica.