Skip to content

Instantly share code, notes, and snippets.

@NTerpo
Last active September 6, 2017 13:36
Show Gist options
  • Select an option

  • Save NTerpo/314658e1d3d528771ddbb3572859ad09 to your computer and use it in GitHub Desktop.

Select an option

Save NTerpo/314658e1d3d528771ddbb3572859ad09 to your computer and use it in GitHub Desktop.
SELECT ?instrumentPermID ?instrumenthasName ?instrumenthasPermId ?assetClassPermId ?assetClassLabel ?assetClassBroader ?assetClassComment ?instrumentStatus ?primaryQuotehasPermId ?primaryQuotehasExchangeCode ?primaryQuotehasRic ?primaryQuotehasName ?primaryQuotehasExchangeTicker ?primaryQuotehasMic ?instrumentIsIssuedBy ?orgActivityStatus ?orgHasLatestOrganizationFoundedDate ?isIncorporatedIn ?isDomiciledIn ?orgName ?orgHasPrimaryBusinessSector ?orgHasPrimaryIndustryGroup ?orgHasURL ?orgHasOrganizationPrimaryQuote ?orgHasPrimaryInstrument ?orgHasHoldingClassification ?orgHasIPODate ?orgHasLEI ?orgPermId ?org
WHERE {
?org <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://permid.org/ontology/organization/Organization> .
?org <http://permid.org/ontology/financial/hasPrimaryInstrument> ?instrumentPermID .
?instrumentPermID <http://permid.org/ontology/common/hasName> ?instrumenthasName .
?instrumentPermID a <http://permid.org/ontology/financial/Instrument> .
?instrumentPermID <http://permid.org/ontology/common/hasPermId> ?instrumenthasPermId .
?instrumentPermID <http://permid.org/ontology/financial/hasAssetClass> ?instrumentAssetClass .
?instrumentPermID <http://permid.org/ontology/financial/hasInstrumentStatus> ?instrumentStatus .
?instrumentPermID <http://permid.org/ontology/financial/hasPrimaryQuote> ?primaryQuote .
?instrumentPermID <http://permid.org/ontology/financial/isIssuedBy> ?instrumentIsIssuedBy .
OPTIONAL {
?instrumentAssetClass <http://permid.org/ontology/common/hasPermId> ?assetClassPermId .
?instrumentAssetClass <http://www.w3.org/2000/01/rdf-schema#label> ?assetClassLabel .
?instrumentAssetClass <http://www.w3.org/2004/02/skos/core#broader> ?assetClassBroader .
?instrumentAssetClass <http://www.w3.org/2000/01/rdf-schema#comment> ?assetClassComment .
}
OPTIONAL {
?primaryQuote <http://permid.org/ontology/common/hasPermId> ?primaryQuotehasPermId .
?primaryQuote <http://permid.org/ontology/financial/hasExchangeCode> ?primaryQuotehasExchangeCode .
?primaryQuote <http://permid.org/ontology/financial/hasRic> ?primaryQuotehasRic .
?primaryQuote <http://permid.org/ontology/common/hasName> ?primaryQuotehasName .
?primaryQuote <http://permid.org/ontology/financial/hasExchangeTicker> ?primaryQuotehasExchangeTicker .
?primaryQuote <http://permid.org/ontology/financial/hasMic> ?primaryQuotehasMic .
}
?org <http://permid.org/ontology/common/hasPermId> ?orgPermId .
?org <http://permid.org/ontology/organization/hasActivityStatus> ?orgActivityStatus .
?org <http://permid.org/ontology/organization/hasLatestOrganizationFoundedDate> ?orgHasLatestOrganizationFoundedDate .
?org <http://permid.org/ontology/organization/isIncorporatedIn> ?orgIsIncorporatedIn .
?org <http://www.omg.org/spec/EDMC-FIBO/BE/LegalEntities/CorporateBodies/isDomiciledIn> ?orgIsDomiciledIn .
?org <http://www.w3.org/2006/vcard/ns#organization-name> ?orgName .
?org <http://permid.org/ontology/organization/hasPrimaryBusinessSector> ?orgHasPrimaryBusinessSector .
?org <http://permid.org/ontology/organization/hasPrimaryEconomicSector> ?orgHasPrimaryEconomicSector .
?org <http://permid.org/ontology/organization/hasPrimaryIndustryGroup> ?orgHasPrimaryIndustryGroup .
?org <http://permid.org/ontology/organization/hasInactiveDate> ?orgHasInactiveDate .
?org <http://www.w3.org/2006/vcard/ns#hasURL> ?orgHasURL .
?org <http://permid.org/ontology/financial/hasOrganizationPrimaryQuote> ?orgHasOrganizationPrimaryQuote .
?org <http://permid.org/ontology/organization/hasHoldingClassification> ?orgHasHoldingClassification .
?org <http://permid.org/ontology/organization/hasIPODate> ?orgHasIPODate .
?org <http://permid.org/ontology/organization/hasLEI> ?orgHasLEI .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment