struql is an actively used query language created in 1999. A StruQL query is a function from a set of input graphs to an output graph.

21Years Old ?Users ?Jobs

Example code from the web:

 // Link root page to page of all accounts
 link Root() -> "Accounts" -> AccountsPage()
 // AccountsPage refers to each account in account database and its associated page
 { where (acct, name, street, city, state, zip) in SQL.query("AccountDB", "select acct ...")
 link AccountsPage() -> "Info" -> Info(acct),
 Info(acct) -> { "Acct" acct, "Name" name, "Street" street,
 "City" city, "State" state, "Zip" zip,
 "AcctPage" AcctPage(acct) },
 AcctPage(acct) -> "Info" -> Info(acct)
 
  // AcctPage refers to non-zero usage records in the usage database.
  { where (date, dom is int, intl is int) in SQL.query("UsageDB", "select date ...", acct)
  dom + intl > 0
  link AcctPage(acct) -> "UsageData" -> UsageData(acct),
  UsageData(acct) -> "Entry" -> UsageEntry(acct, date),
  UsageEntry(acct, date) -> { "Date" date, "Total" (dom + intl) }
  }
  // Query postal database to determine possible aliases for account
  { where XMLRoot{root}, root -> "addresses"."entry" -> addr,
  addr -> { "name" alias, "address"."street" street1, "address"."zip" zip },
  street1 = street
  link Info(acct) -> "Alias" -> alias
  }
  }

Last updated June 22nd, 2020

Edit struql on GitHub