Library: SQL for the Public Website
Refer to the SQL Quick Guide (.pdf)(.docx) for an overview. This document is based on an NPGS Question & Answer webinar given on March 30, 2017. SQL examples using GRIN-Global tables and fields are explained in the document. Also included are SQL statements which can be used to determine the GG table and field names.
The document SQL the Public Website Queries (.pdf) (.docx) contains SQL examples which can be copied into the PW query box. They will need to be adjusted to meet the specifics of an institute's GG installation.
The file JOIN Examples is referenced by the SQL Quick Guide and illustrates the key fields by which some of the frequently used GG tables relate to each other.
The file GRIN-Global Table Names contains multiple spreadsheets, including a list of table names as of April 3, 2017 along with the SQL to produce this list. The other worksheets are grouped loosely by areas. The last three worksheets are the site inventory tables, site short names with IDs, and the code groups and codes. In some cases the SQL is included where applicable.