POSC Live! Home Page

How the Query Demo Works

Veiw/Submit Feedback

POSC Home Page

 

Ad Hoc PSQL Query Tool

    What Is PSQL?

    PSQL (POSC SQL) is a SQL-like query language corresponding to Level 2 of the POSC Data Access specifications. It is intended to be defined as close as possible to the SQL3 language for which specifications are currently being developed. View the detailed PSQL language specifications.

    What Is Available at this Site?

    Currently, this page contains a form which allows you to enter either PSQL or SQL statements that will be executed in real time against a live POSC data store located at the POSC offices in Houston.

    To execute a query, select the database you wish to query and the type of language statement, SQL or PSQL. Then, in the text entry area of the form, enter an Epicentre-based PSQL statement or an SQL statement compatible with POSC's Epicentre Relational Implementation. Press the "Execute" button to execute the query. The results of the query will be returned as an HTML table in a separate browser window.

    Are There Any Restrictions on the Query?

    Queries containing a select * clause are currently not allowed because they tend to take too much execution time. All other PSQL and SQL constructs are allowed.

    Example Queries

    Here are some example PSQL queries you can try to get started. For assistance in constructing new queries, browse the logical data model dictionary:

    Purpose Query
    Select well identifier for all wells. select identifier from well
    Select well identifier and wellbore identifier for all wells. select well.identifier, wellbore.identifier from well order by 1, 2
    Select well identifier and well surface point location for all wells. select well.identifier, well.well_surface_point.pty_location_2d.data_value from well
    Select well identifier, completion identifier and the location of the completion in the wellbore for all wells. select well.identifier, well.well_completion.identifier,
    well.well_completion.position_in_wellbore[wellbore_interval].
    pty_geometry_1d_edge[pty_geometry_simple_1d_edge].minimum_point,
    well.well_completion.position_in_wellbore[wellbore_interval].
    pty_geometry_1d_edge[pty_geometry_simple_1d_edge].maximum_point from well
    order by well.identifier