Book Contents

Book Index

Next Topic

Home

Running Simple Queries

Each example database includes several files containing SQL queries that are intended to represent queries that might be used 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 the SQL Programmer's Guide.

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

  1. In the Administration Tools select Connect to Database.

    Welcome to the vsql, Vertica_Database v2.1.GA interactive terminal.

    Type: \h for help with SQL commands

    \? for help with vsql commands

    \g or terminate with semicolon to execute query

    \q to quit

    Stock_Schema=>

  2. Use the \i meta-command to execute the query script. For example:

    Stock_Schema=> \i stock_query_01.sql

Clickstream Example Database

clickstream_query_01.sql

clickstream_query_02.sql

clickstream_query_03.sql

clickstream_query_04.sql

clickstream_query_05.sql

Credit History Example Database

credithistory_query_01.sql

credithistory_query_02.sql

credithistory_query_03.sql

credithistory_query_04.sql

credithistory_query_05.sql

Stock Exchange Example Database

stock_query_01

stock_query_02

stock_query_03

stock_query_04

stock_query_05

stock_query_06

stock_query_07

Retail Sales Example Database

retail_query_01.sql

retail_query_02.sql

retail_query_03.sql

Telecom Example Database

telecom_query_01.sql

telecom_query_02.sql

telecom_query_03.sql

telecom_query_04.sql

telecom_query_05.sql