User:Glrx

From Wikidata
Jump to navigation Jump to search

Need to learn how to...[edit]

Collapse identical items[edit]

See Help:Merge.

Resolve part issues[edit]

Correct errors[edit]

The en.description for dusk is the end of astronomical twilight. It has the dusks (and presumably the dawns) be instants the same as sunrise and sunset. So meeting somebody at dawn is meeting them at first light (not anytime before sunrise). So dusks are moments when a twilight begins or ends. Twilights are time intervals. Google translate has German using twilight for dusk and dawn; dusk transliterates to evening twilight and dawn is morning twilight.

wikt:dawn is also troubling. It says sunrise is a synonym, dusk is an wikt:antonym, and twilight is a wikt:hypernym (less specific term). It says the civil dawn, astronomical dawn, and nautical dawn are wikt:hyponyms (more specific term). Sunrise is an instant near the end of civil twilight; civil dawn is the instant that marks the start of civil twilight. So dawn is start of morning twilight; dusk is the end of evening twilight. Common usage makes dusk and dawn intervals.

Flag List[edit]

In the 1700s, the Royal Navy advancement was by date of rank. A book was published periodically that had the flag officer list and the captains list. Ultimately, a query should be able to produce that list as a function of date.

Post Captains[edit]

Calendar[edit]

The calendar switch may be an issue. The Gregorian calendar switch was in October 1582 (+11 days), but it was not adopted by all countries. Scotland switched in 1600, England switched in September 1752, and Russia in January 1918.

For example, George Washington was born 11 February 1731 Julian, but that is 22 February 1731 Gregorian.

That may have an impact on the flag list. If the date is after 1752, then it is clearly Gregorian. If the date is before the switch, then was the date left as Julian or was it corrected?

Titles[edit]

The flag list uses titles.

Hierarchy (guess) See en:Landed gentry, en:Social class in the United Kingdom, en:Peerage, en:Nobility, en:Royal family

Properties

Promotion[edit]

This reference describes strict promotion, what the admiralty did with infirm captains, and the "yellow" squadron. In 1747, a captain could be promoted to "Rear-Admiral without distinction of squadron".

Significantly, it describes distribution at particular times.

In 1769,

  • honorary Vice Admiral of Great Britain, Admiral of the Fleet Edward Hawke, 1st Baron Hawke (1705-1781), appointed 1765
  • (1) Admiral of the Fleet: Edward Hawke, 1st Baron Hawke (1705-1781) 15 January 1768
  • (7) Admirals
    • (3) of the White
    • (4) of the Blue
  • (10) Vice Admirals
    • (3) of the Red
    • (3) of the White
    • (4) of the Blue
  • (11) Rear Admirals
    • (4) of the Red
    • (4) of the White
    • (5) of the Blue
  • (22) Superannuated Rear Admirals (were these never advanced through the squadrons?)

In 1812 (see also https://babel.hathitrust.org/cgi/pt?id=nyp.33433008433462&view=1up&seq=12),

  • First Lord of the Admiralty, Charles Philip Yorke (1764-1834) and Robert Dundas, 2nd Viscount Melville (1771-1851)
  • (1) Admiral of the Fleet: HRH the Duke of Clarence (1765-1837), appointed 1811
  • (61) Admirals
    • (21) of the Red (created in 1805)
    • (20) of the White
    • (20) of the Blue
  • (65) Vice Admirals
    • (22) of the Red
    • (19) of the White
    • (24) of the Blue
  • (64) Rear Admirals
    • (19) of the Red
    • (17) of the White
    • (24) of the Blue
  • (31) Superannuated Rear Admirals

Royal Navy rank, military branch, and occupation[edit]

A rank specific to the Royal Navy implies a military branch.

# rank implies branch
SELECT DISTINCT ?person ?personLabel ?rankLabel
{ 
  # military rank -- should have a start time
  # admiral of the fleet wd:Q842486 .
  # admiral of the fleet (Royal Navy) wd:Q2501631
  # admiral
  # admiral (Royal Navy) wd:Q2916006
  # vice admiral wd:Q214443 .
  # vice admiral (Royal Navy) wd:Q4902790
  # rear admiral wd:Q156945
  # rear admiral (Royal Navy) wd:Q15615347
  # captain
  # captain (Royal Navy) wd:Q5036514
  # flag officer (watch out: rear admiral is an instance of military rank) wd:Q977459 .

  # select a Royal Navy rank
  BIND (wd:Q2916006 AS ?rank) .

  # person has that rank
  ?person wdt:P410 ?rank .
  
  # human instead of fictional
  ?person wdt:P31 wd:Q5 .
  
  # person in Royal Navy
  FILTER not exists {?person wdt:P241 wd:Q172771 .}.
  
  # occupation is naval officer
  # FILTER not exists {?person wdt:P106 wd:Q10669499 .}.
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?timeAdmiral
Try it!

Find a person[edit]

# Find a person
SELECT ?person ?personLabel ?timeCaptain ?timeDeath ?threeID WHERE {
  BIND("1800-12-01"^^xsd:dateTime AS ?dateDeath) .
  ?person wdt:P31 wd:Q5 .
  
  # ?person wdt:P570 ?dateDeath .
  
  # Three Decks person ID
  ?person wdt:P7389 ?threeID .

  # ?person wdt:P410 ?rank .
  
  optional {
    ?person wdt:P570 ?timeDeath .
    } .
  
  optional {
      ?person p:P410 ?stmtCaptain .
      ?stmtCaptain ps:P410 wd:Q5036514 .
      ?stmtCaptain pq:P580 ?timeCaptain .
    } .
  
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
ORDER BY ?timeDeath
Try it!

Three Decks list[edit]

# Three Decks list for the Royal Navy
SELECT DISTINCT ?person ?personLabel ?threeID
{ 
  # person in Royal Navy
  ?person wdt:P241 wd:Q172771 .
  
  # human instead of fictional
  ?person wdt:P31 wd:Q5 .
  
  ?person wdt:P7389 ?threeID .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?threeID
Try it!

List of Admirals[edit]

en:List of Royal Navy admirals (1707–current) (which would not include vice admirals such as Nelson).

# Admiral list for the Royal Navy
SELECT DISTINCT ?timeAdmiral ?person ?personLabel ?timeBirth ?timeDeath ?fleet ?threeID
{ 
  # allow the report to work for different years
  BIND ("1707-01-01"^^xsd:dateTime AS ?timeReport) .
  
  # person in Royal Navy
  ?person wdt:P241 wd:Q172771 .
  
  # human instead of fictional
  ?person wdt:P31 wd:Q5 .
  
  # ?person wdt:P410 ?rank .
  # ?rank wdt:P279 wd:Q977459 .
  # admiral of the fleet (of the Royal Navy) subclass of admiral of the fleet Q842486
  # ?person wdt:P410 wd:Q2501631 .
  # use P279 to pick up the subclass
  
  # military rank -- should have a start time
  # admiral of the fleet wd:Q842486 .
  # admiral of the fleet (Royal Navy) wd:Q2501631
  # admiral
  # admiral (Royal Navy) wd:Q2916006
  
  # get statements about the person's rank
  optional {
      ?person p:P410 ?stmtFleet .
      ?stmtFleet ps:P410 wd:Q2501631 .
      BIND(1 AS ?fleet) .
    }
  
  ?person p:P410 ?stmtAdmiral .
  ?stmtAdmiral ps:P410 wd:Q2916006 .
  optional {
    ?stmtAdmiral pq:P580 ?timeAdmiral .
  }
  
  optional {
    ?person wdt:P7389 ?threeID .
    } .
  
  # get time  of death (some have multiple death dates)
  ?person wdt:P570 ?timeDeath .
  ?person wdt:P569 ?timeBirth .

  filter ( ?timeReport < ?timeDeath) .

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?timeDeath
Try it!

January 1790 List[edit]

Nelson was 169th on the Captains List.

List has 49 Admirals. Query gets 50. Ah, the book miscounts by calling # 26 just # 25; there are 50 Admirals.

John Laforey (Q6243805) Laforey got special dispensation to be # 40. How should that be handled? Captain's date sorts. Promoted out of the yellow?

January 1791 List[edit]

List has 56 entries. Query gets 56.

✓ Done From 1790 list, need to add

January 1792 List[edit]

Nelson was 140th on the Captains List.

✓ Done There are 54 entries on 1792 list. Query gets 54.

August 1795 List[edit]

Nelson is 7th on the captains' list.

✓ Done Query produces 106 entries. List has 106 entries.

January 1798 List[edit]

Nelson is RA of the Blue at 101.

✓ Done Flag list has 104 entries. Query now gives 104.

Gidoin and Gayton are not on the 1798 list. Need to find two more:

January 1799 list[edit]

Nelson is RA of the Blue at 96.

✓ Done Flag list has 99 entries. Query has 98 entries.

Make the query use 1 November 1798 and it works.

So missing one entry? Checking whole list...

  • 46. Symons
  • 48. Thompson
  • 84. Hugh Cloberry Christian (-23 November 1798) so should not be on the list!
  • 86. Stanhope
  • 97. Frederick

January 1802 List[edit]

The vice admirals end at 83 (last is Nelson). The rear admirals end at 138 (last is Sir James Saumarez 1 January 1801). Query gives 120; missing 18.

January 1802 List
Number Name Admiral Vice Admiral Rear Admiral Captain
1 Sir Peter Parker, 1st Baronet (Q3376803)
1799-09-16
1789-09-?? 1779-03-19 1777-04-18 1747-05-06
2 Robert Roddam (Q7349346) 1793-02-?? 1779-03-19 1778-01-23 1747-07-09
3 Mark Milbanke (Q6768881) 1793-02-?? 1780-09-26 1779-03-19 1748-05-21
4 Nicholas Vincent (Q76023582) 1794-04-?? 1787-09-24 1779-03-19 1748-07-05
5 Thomas Graves, 1st Baron Graves (Q334087)
6 Robert Digby (Q7343544) 1794-04-?? 1787-09-24 1779-03-19 1755-08-05
7 Alexander Hood, 1st Viscount Bridport (Q332644)
8 Sir Chaloner Ogle, 1st Baronet (Q7526167)
9 Samuel Hood, 1st Viscount Hood (Q332623)
10 Sir Richard Hughes, 2nd Baronet (Q4502682)
11 John Elliot (Q2913456)
12 William Hotham, 1st Baron Hotham (Q3568715)
13 Joseph Peyton (Q27894126)
14 Charles Middleton, 1st Baron Barham (Q1617371)
15 Sir Richard King, 1st Baronet (Q7528612)
16 John Jervis, 1st Earl of St Vincent (Q335254)
17 Adam Duncan, 1st Viscount Duncan (Q335334)
18 Richard Braithwaite (Q107083826) Richard Braithwaite
19 Phillips Cosby (Q7185891)
20 Samuel Pitchford Cornish (Q76317518)
21 John Brisbane (Q76305177)
22 Charles Wolseley (Q26419746)
23 William IV (Q130822)
24 Sir Richard Onslow, 1st Baronet (Q7528640)
25 Sir Robert Kingsmill, 1st Baronet (Q245666)
26 Hyde Parker (Q1339962)
27 Benjamin Caldwell (Q2896020)
28 William Cornwallis (Q1935376)
29 William Allen (Q107084012) William Allen
30 Charles Buckner (Q18715916)
31 John Gell (Q6235060)
32 William Dickson (Q75599128)
33 Alan Gardner, 1st Baron Gardner (Q4706673)
34 Robert Linzee (Q7346917)
35 James Wallace (Q6145042)
36 William Peere Williams-Freeman (Q8016725)
37 Sir Thomas Pasley, 1st Baronet (Q16230449)
38 Thomas Rich (Q26455748)
39 James Cumming (Q107084072) James Cumming
40 John Colpoys (Q3181258)
41 Skeffington Lutwidge (Q7534311)
42 Sir Archibald Dickson, 1st Baronet (Q28935230)
43 George Montagu (Q5542575)
44 Thomas Dumaresq (Q105079127)
45 George Elphinstone (Q337525)
46 James Pigott (Q106739167)
47 William Waldegrave, 1st Baron Radstock (Q8019889)
48 Thomas Mackenzie (Q7792097)
49 Thomas Pringle (Q7793299)
50 Roger Curtis (Q7358051)
51 Henry Harvey (Q3132816)
52 Robert Mann (Q16230412)
53 Sir William Parker, 1st Baronet, of Harburn (Q3568867)
54 Charles Holmes Calmady (Q106827466)
55 John Bourmaster (Q75599153)
56 George Young (Q18344132)
57 John Henry (Q107084382) John Henry
58 Richard Rodney Bligh (Q7328715)
59 Alexander Graeme (Q18715920)
60 George Keppel (Q106828217)
61 Samuel Reeve (Q19563369) Samuel Reeve
62 Robert Biggs (Q106762814)
63 Francis Parry (Q107084507) Francis Parry
64 Isaac Prescott (Q107084568) Isaac Prescott
65 John Bazely (Q15452700)
66 Christopher Mason (Q106827445)
67 Thomas Davy Spry (Q107084622) Thomas Spry
68 Sir John Orde, 1st Baronet (Q3182219)
69 William Young (Q8020680)
70 James Gambier, 1st Baron Gambier (Q721275)
71 Andrew Mitchell (Q4758040)
72 Charles Chamberlayne (Q76271008)
73 Peter Rainier (Q4393299)
74 Christopher Parker (Q18756628)
75 Philip Patton (Q18734035)
76 Sir Charles Pole, 1st Baronet (Q4369510)
77 John Brown (Q75576832)
78 John Leigh Douglas (Q42965446)
79 William Swiney (Q107084714) William Swiney
80 Charles Edmund Nugent (Q5077246)
81 Charles Powell Hamilton (Q2579421)
82 Edmund Dod (Q107084762) Edmund Dod
83 Horatio Nelson (Q83235) - 1801-01-01 1797-02-20 1779-06-11
84 Sir George Home, 7th Baronet (Q76030414)
85 Sir Charles Cotton, 5th Baronet (Q2958797)
86* John Thomas
https://morethannelson.com/officer/john-thomas/
87* James Brine
https://morethannelson.com/officer/james-brine/
son en:Augustus Brine
88 John Pakenham (Q21182813)
89 Erasmus Gower (Q74563)
90 John Holloway (Q6239638) John Holloway
91 George Wilson (Q5546402) George Wilson
92 Sir Charles Knowles, 2nd Baronet (Q1064809)
93 Thomas Pakenham (Q7792981)
94* Robert Deans
https://threedecks.org/index.php?display_type=show_crewman&id=328
95 Cuthbert Collingwood, 1st Baron Collingwood (Q335267) Cuthbert Collingwood
96 James Hawkins-Whitshed (Q15375977) James Hawkins Whitshed
97* Arthur Kempe
https://threedecks.org/index.php?display_type=show_crewman&id=8504
98 Smith Child (Q7545091)
99 Charles FitzGerald, 1st Baron Lecale (Q5077685)
100* Thomas Taylor
https://morethannelson.com/officer/thomas-taylor/
https://threedecks.org/index.php?display_type=show_crewman&id=2459
101 Sir John Duckworth, 1st Baronet (Q706762)
102 John Willett Payne (Q6264105)
103 Robert Calder (Q714425)
104 James Richard Dacres (Q6142057)
105 George Cranfield Berkeley (Q4084923) George Berkeley
106* Thomas West
https://threedecks.org/index.php?display_type=show_crewman&id=14982
107* James Douglas
https://threedecks.org/index.php?display_type=show_crewman&id=351
Father: en:Sir James Douglas, 1st Baronet
108 Peter Aplin (Q7172547)
109* Henry Savage
https://threedecks.org/index.php?display_type=show_crewman&id=12773
110 Bartholomew Rowley (Q4865275)
111 Sir Richard Bickerton, 2nd Baronet (Q15994303)
112* George Bowen
https://threedecks.org/index.php?display_type=show_crewman&id=134
113 Robert Montagu (Q76328954)
114* John Fergusson (s or ss)
https://morethannelson.com/officer/john-ferguson/
115 Edward Edwards (Q966744) Edward Edwards
116 Sir John Borlase Warren, 1st Baronet (Q1750346)
117* Edward Tyrrel Smith
https://morethannelson.com/officer/edward-tyrrell-smith/
118 Thomas Graves (Q286462)
119 Thomas McNamara Russell (Q7792351)
120 Sylverius Moriarty (Q104826889)
121 Henry Trollope (Q3133115)
122 Sir Henry Edwyn Stanhope, 1st Baronet (Q18716109) Henry Edwin Stanhope
123* Robert McDouall (spelling?)
https://threedecks.org/index.php?display_type=show_crewman&id=9979
124 Billy Douglas (Q107095174) Billy Douglas
125* John Wickey
https://en.m.wikisource.org/wiki/Page:Royal_Naval_Biography_Marshall_v1p1.djvu/184
126 John Inglis (Q56726520) John Inglis
127* John Fish
https://en.wikisource.org/wiki/Royal_Naval_Biography/Fish,_John
https://threedecks.org/index.php?display_type=show_crewman&id=1453
128* Jahleel Brenton
https://threedecks.org/index.php?display_type=show_crewman&id=3837
son: en:Jahleel_Brenton
129 John Knight (Q6243316) John Knight
130 Edward Thornbrough (Q5345613)
131* James Kempthorne
https://threedecks.org/index.php?display_type=show_crewman&id=1341
132* Sampson Edwards
https://morethannelson.com/officer/sampson-edwards/
https://threedecks.org/index.php?display_type=show_crewman&id=395
133 George Campbell (Q5537640) George Campbell
134* Henry Cromwell
https://threedecks.org/index.php?display_type=show_crewman&id=296
135 Arthur Phillip (Q311548) Arthur Phillip
136 William George Fairfax (Q8009784)
137 Thomas Totty (Q7794515) Thomas Totty
138 James Saumarez, 1st Baron de Saumarez (Q335837)

July 1803 List[edit]

  • 125 James Saumarez

So there are no new additions, but 13 died. My list went from (120+18) to (109+18-2).

July 1804 List[edit]

Nelson is VAW at 70.

  • 121 James Saumarez (so 4 previous admirals in the flag list died).

My list is 104 long but includes new admirals #125 and #139. Therefore Saumarez would be 102 on my list, so I'm missing 19 earlier admirals

With new additions it would be 104+37 = 141. That is only missing 9 earlier admirals. So of the missing 18 1802 additions, only 9 are left?

Flag list is 150 long.


Need to add (39-2):

January 1807 List[edit]

January 1809 List[edit]

January 1812 List[edit]

Find more years: https://catalog.hathitrust.org/Record/012313436

January 1831 List[edit]

https://babel.hathitrust.org/cgi/pt?id=mdp.39015073474838&view=1up&seq=9

More Stuff[edit]

There is the Blue-White-Red mess:

SELECT ?person ?personLabel ?rank ?rankLabel WHERE {
  BIND(wd:Q24038804 AS ?rank) .
  ?person wdt:P31 wd:Q5 .

  ?person wdt:P410 ?rank .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
Try it!

Also the honorary mess Rear-Admiral of the United Kingdom (Q2995864), Vice Admiral of the United Kingdom (Q3556878), Lord High Admiral (Q16153574)

Also next lower rank (P3729) next higher rank (P3730)

There are problems with the underlying data.

# improper occupations
SELECT ?p ?pLabel ?w ?wLabel WHERE {
   wd:Q30 p:P6/ps:P6 ?p .
   ?p wdt:P26 ?w .
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }
Try it!
SELECT ?person ?personLabel ?rankLabel WHERE
{
  # BIND (wd:Q214443 AS ?rank) .

  # real human
  ?person wdt:P31 wd:Q5 .

  # has an occupation
  ?person wdt:P106 ?rank .
  
  # occupation is a naval officer rank
  ?rank wdt:P31/wdt:P279* wd:Q4226220 .
  # occupation is a military rank
  # ?rank wdt:P31/wdt:P279* wd:Q56019 .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
Try it!
# Looking at ranks
SELECT ?rank ?rankLabel
{
  # this returns just 2: Chief of Joint Operations and rear admiral
  #?rank wdt:P31/wdt:P279* wd:Q977459 .
  #?rank wdt:P279* wd:Q977459 .
  
  # instance of military rank
  ?rank wdt:P31/wdt:P279* wd:Q56019 .
  # this part of the Royal Navy
  ?rank wdt:P361 wd:Q172771 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?rankLabel
Try it!

Flag list query[edit]

Should fix the post captain issue (a subclass of captain).

# Working on a flag list for the Royal Navy
SELECT DISTINCT ?person ?personLabel ?fleet ?timeAdmiral ?timeVice ?timeRear ?timeCaptain ?threeID
{ 
  # allow the report to work for different years
  BIND ("1802-01-01"^^xsd:dateTime AS ?timeReport) .
  
  # person in Royal Navy
  ?person wdt:P241 wd:Q172771 .
  
  # human instead of fictional
  ?person wdt:P31 wd:Q5 .
  
  # ?person wdt:P410 ?rank .
  # ?rank wdt:P279 wd:Q977459 .
  # admiral of the fleet (of the Royal Navy) subclass of admiral of the fleet Q842486
  # ?person wdt:P410 wd:Q2501631 .
  # use P279 to pick up the subclass
  
  # military rank -- should have a start time
  # admiral of the fleet wd:Q842486 .
  # admiral of the fleet (Royal Navy) wd:Q2501631
  # admiral
  # admiral (Royal Navy) wd:Q2916006
  # vice admiral wd:Q214443 .
  # vice admiral (Royal Navy) wd:Q4902790
  # rear admiral wd:Q156945
  # rear admiral (Royal Navy) wd:Q15615347
  # captain
  # captain (Royal Navy) wd:Q5036514
  # flag officer (watch out: rear admiral is an instance of military rank) wd:Q977459 .
  
  # get statements about the person's rank
  optional {
      ?person p:P410 ?stmtFleet .
      ?stmtFleet ps:P410 wd:Q2501631 .
      BIND(1 AS ?fleet) .
    }
  
  optional {
      ?person p:P410 ?stmtAdmiral .
      ?stmtAdmiral ps:P410 wd:Q2916006 .
      ?stmtAdmiral pq:P580 ?timeAdmiral .
    } .
  
  optional {
      ?person p:P410 ?stmtVice .
      ?stmtVice ps:P410 wd:Q4902790 .
      ?stmtVice pq:P580 ?timeVice .
    } .
  
  optional {
      ?person p:P410 ?stmtRear .
      ?stmtRear ps:P410 wd:Q15615347 .
      ?stmtRear pq:P580 ?timeRear .
    } .
  
  optional {
      ?person p:P410 ?stmtCaptain .
      ?stmtCaptain ps:P410 wd:Q5036514 .
      ?stmtCaptain pq:P580 ?timeCaptain .
    } .
  
  # Three Decks ID
  optional {
      ?person wdt:P7389 ?threeID .
    } .
  
  # get time  of death (some have multiple death dates)
  ?person wdt:P570 ?timeDeath .
  filter ( ?timeReport <= ?timeDeath)  .
  
  filter ( ?timeReport > ?timeRear) .
  
  # occupation naval officer
  # ?person wdt:P106 wd:Q10669499
  # occupation military officer
  # ?person wdt:P106 wd:Q189290 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?timeRear ?timeCaptain
Try it!

Participants in a battle[edit]

Consider a battle such as Battle of Cape St. Vincent (Q373401). Which ships participated?

en:Battle_of_Cape_St._Vincent_(1797) provides a list of 15 + 7 ships on the British side. Spanish fleet is broken down by squadrons.

Consider HMS Victory (Q213958)

  • conflict (P607) → First Battle of Ushant, Battle of Ushant, Battle of Cape Spartel, Battle of Cape St. Vincent, Battle of Trafalgar
    conflict is used for battles...
  • participant in (P1344) → Battle of Trafalgar, Battle of Cape St. Vincent

The query now gets 19 results (short of 22). Three ships are unrated.

SELECT ?ship ?shipLabel WHERE {

  # ship of the line Q207452
  ?ship wdt:P31/wdt:P279 wd:Q207452 .

  # conflict
  ?ship wdt:P607 wd:Q373401 .
  
  # particpant
  # ?ship wdt:P1344 wd:Q373401 .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
Try it!

Ships of the Line[edit]

SELECT ?ship ?shipLabel
{
  # instance of ship of the line Q207452
  ?ship wdt:P31/wdt:P279* wd:Q207452 .
  
  # operator GB
  ?ship wdt:P137 wd:Q172771 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?shipLabel
Try it!

A confused hierarchy: the Ajax class is a subclass of ship of the line rather than being a subclass of n-rate.

If {A instance of B, A instance of C, B subclass C} → remove {A instance of C}.

If {A instance of C, B subclass C} → possibly {A instance of B}.

SELECT ?shipclass ?shipclassLabel
{
  # first-rate Q892367 subclass of ship of the line Q207452
  # second-rate Q892368
  # third-rate Q892492
  # fourth-rate Q892562
  # fifth-rate Q892554 is subclass of frigate Q12012855
  # sixth-rate Q892278 is subclass of frigate

  # subclass of ship of the line Q207452
  ?shipclass wdt:P279 wd:Q207452 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?shipclassLabel
Try it!

Languages[edit]

SELECT ?lang ?langLabel ?l1 ?l2 ?l3 ?l4
{
  # instance of a language
  ?lang wdt:P31/wdt:P279* wd:Q34770 .

  # ISO 639-1 code
  optional {
    ?lang wdt:P218 ?l1 .
  } .
  
  # ISO 639-2 code
  optional {
    ?lang wdt:P219 ?l2 .
  } .

  # ISO 639-3 code
  optional {
    ?lang wdt:P220 ?l3 .
  } .
  
  # IETF language tag
  optional {
    ?lang wdt:P305 ?l4 .
  } .
 
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?langLabel
Try it!

Submarines[edit]

Submarines do not have patrol plots, attacks, sinkings.

Conlicts: WW II is a war, Pacific War is a theatue.

US submarines in WW II[edit]

SELECT ?sub ?subLabel
{
  # instance of submarine
  ?sub wdt:P31/wdt:P279* wd:Q2811 .
  
  # conflict is Pacific War
  #?sub wdt:P607 wd:Q184425 .

  # conflict is WW II
  ?sub wdt:P607 wd:Q362 .
  
  # operator is US Navy
  ?sub wdt:P137 wd:Q11220 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?subLabel
Try it!

German submarines in WW II[edit]

Battle of the Atlantic statistics in war reports and post war surveys. Stats such as number of patrols, merchants sunk, and submarines sunk.

Group by month. Count

SELECT ?sub ?subLabel ?timeSink ?timeScuttle
{
  # instance of submarine
  ?sub wdt:P31/wdt:P279* wd:Q2811 .
  
  # ?sub wdt:P607 wd:Q184425 .

  # conflict is WW II
  ?sub wdt:P607 wd:Q362 .
  
  # operator is Kriegsmarine
  ?sub wdt:P137 wd:Q151701 .

  optional {
    # significant event is sinking
    # ?sub wdt:P793 wd:Q30880545 .
    ?sub p:P793 ?stmtSignificant .
    ?stmtSignificant ps:P793  wd:Q30880545 .
    ?stmtSignificant pq:P585 ?timeSink .
  }
  optional {
    # significant event is scuttling
    # ?sub wdt:P793 wd:Q1786766 .
    ?sub p:P793 ?stmtSignificant .
    ?stmtSignificant ps:P793  wd:Q1786766 .
    ?stmtSignificant pq:P585 ?timeScuttle .
  }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?timeSink
Try it!

Second Happy Time[edit]

See en:https://en.wikipedia.org/wiki/Second_Happy_Time. It has a list of ships lost and submarines lost.

See also https://www.youtube.com/watch?v=gp5diNUq-rU&t=1m37s at 1:37

Japanese warships[edit]

Goal: a query that lists all IJN vessels torpedoed by a submarine during WW II.

No mention of sinking by USS Cavalla (Q1398898)

en:List of sunken aircraft carriers

World War I fighter pilots[edit]

The query has several holes. The military branch may not be specified or it may be too generic. Or it may be wrong. follows (P155), followed by (P156), replaces (P1365), replaced by (P1366)

Same with

Pilots

SELECT ?pilot ?pilotLabel ?branch ?branchLabel ?awardLabel
{
  # instance of human
  ?pilot wdt:P31 wd:Q5 .

  # occupation is fighter pilot
  ?pilot wdt:P106 wd:Q618694 .
  
  OPTIONAL {
    # military branch
    ?pilot wdt:P241 ?branch .
  }
  
  # conflict is WW I
  ?pilot wdt:P607 wd:Q361 .
  
  OPTIONAL {
    # award
    ?pilot wdt:P166 ?award .
  }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?pilotLabel
Try it!

Cast member in two films[edit]

Find the common cast members in two films.

# Find a person
SELECT ?person ?personLabel ?film1Label ?film2Label WHERE {
  # Auntie Mame
  BIND(wd:Q1219582 AS ?film1) .
  # The Big Sleep
  BIND(wd:Q221462 AS ?film2) .
  
  # cast member
  ?film1 wdt:P161 ?person .
  ?film2 wdt:P161 ?person .
  
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
Try it!

Golf tournament winners[edit]

Even better: duplicated table at en:List of men's major championships winning golfers.

SELECT  ?person ?personLabel (COUNT(?tournament) AS ?count) WHERE {
  # tournament is a men's major
  # e.g., 2019 Masters Tournament Q55316366 is P31 of Masters Tournament Q280275
  #    P279 of golf tournament Q15061650 (argh! inappropriate subclass)
  #    P279 of men's major golf championships Q268554
  #      P279 of golf tournament Q15061650
  ?tournament wdt:P31/wdt:P279* wd:Q268554 .
  
  # just a golf tournament
  # ?tournament wdt:P31/wdt:P279* wd:Q15061650 .
  
  # the winner of the tournament
  ?tournament wdt:P1346 ?person .

  # person is human
  # ?person wdt:P31 wd:Q5 .

  # occupation is a golfer (not required for an Open winner)
  # ?person wdt:P106 wd:Q11303721 .
  
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
GROUP BY ?person ?personLabel
ORDER BY DESC(?count)
Try it!

Subclass issue[edit]

The U.S. Open is an open golf tournament which is a subclass of golf tournament. It makes sense to be both a major and an open golf tournament: major does not → open golf tournament. It does not make sense for a major and a golf tournament: major → golf tournament.

SELECT  ?tournament ?tournamentLabel WHERE {
  # tournament is a men's major
  # e.g., 2019 Masters Tournament Q55316366 is P31 of Masters Tournament Q280275
  #    P279 of golf tournament Q15061650 (argh! inappropriate subclass)
  #    P279 of men's major golf championships Q268554
  #      P279 of golf tournament Q15061650
  
  ?tournament wdt:P279 wd:Q268554 .
  
  # just a golf tournament
  ?tournament wdt:P279+ wd:Q15061650 .
  
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
} ORDER BY ?tournamentLabel
Try it!

Refrigerants[edit]

See List of refrigerants and https://www.ashrae.org/technical-resources/standards-and-guidelines/ashrae-refrigerant-designations

SELECT ?ref ?refLabel ?form ?smiles ?melt ?boil ?ashrae ?cas WHERE {
  ?ref wdt:P31 wd:Q266790 .
  
  optional {
    ?ref wdt:P274 ?form .
  }
  
  optional {
    ?ref wdt:P233 ?smiles .
  }
  
  optional {
    ?ref wdt:P2101 ?melt .
  }
  
  optional {
    ?ref wdt:P2102 ?boil .
  }
  
  optional {
    ?ref wdt:P4842 ?ashrae .
   }
  
  optional {
    ?ref wdt:P231 ?cas .
   }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?refLabel
Try it!

City by population in a state[edit]

SELECT ?city ?cityLabel ?countyLabel ?pop WHERE {
  # a city in the US
  ?city wdt:P31/wdt:P279 wd:Q1093829 .
  
  # expect next administrative territory is a county
  ?city wdt:P131 ?county .
  
  # in a particular state
  ?county wdt:P131 wd:Q1384 .
  
  # get the population
  ?city wdt:P1082 ?pop .
 
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY DESC(?pop) LIMIT 1000
Try it!

Stars[edit]

Too many stars in the sky.... Create navigational star (Q108171565) so the relevant subset can be selected quickly. The 1981 Nautical Almanac states:

Typically, only 57 stars are used for navigational purposes in both Northern and Southern Hemispheres. Here you’ll also find Polaris and Scheat. In the Northern Hemisphere Polaris is often used for determination of latitude.

SELECT ?star ?starLabel ?epochLabel ?ra ?decl WHERE {
  ?star wdt:P31 wd:Q108171565 .
  
  ?star wdt:P6259 ?epoch .
  ?star wdt:P6257 ?ra .
  ?star wdt:P6258 ?decl .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} LIMIT 100
Try it!

Epoch[edit]

See

Some of these are inappropriate.

SELECT ?epoch ?epochLabel WHERE {
  ?epoch wdt:P31 wd:Q2703 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?epochLabel
Try it!

Constellations[edit]

Can find the constellations without hitting a time limit.

https://www.iau.org/public/themes/constellations/

Boundaries of the constellations (B1875): http://pbarbier.com/constellations/boundaries.html#:~:text=Original%20boundary%20data%20The%20original%20constellation%20boundary%20data,a%20sequence%20of%20vertices%2C%20one%20vertex%20per%20line

SELECT ?constellation ?constellationLabel WHERE {
  # there are 88 constellations
  # this returns 462 results
  # there are Chinese constellations
  # Pisces instance of constellation and zodiacal constellation
  # ?constellation wdt:P31/wdt:P279* wd:Q8928 .
  
  # try simpler
  # this has 89 results
  #   there are two Musca constellations: wd:Q10435 wd:Q6940204
  # soms has part...
  #   for Orion, a part is the asterism Orion's belt, which has parts
  ?constellation wdt:P31 wd:Q8928 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?constellationLabel
Try it!

Museum paintings[edit]

SELECT ?painting ?paintingLabel ?creatorLabel ?locationLabel WHERE {
  # BIND(wd:Q762 AS ?creator).
  #Louvre
  #BIND(wd:Q19675 AS ?location).
  #Musee d'Orsay
  BIND(wd:Q23402 AS ?location).
  
  # a painting
  ?painting wdt:P31/wdt:P279* wd:Q3305213 .
  
  # painted by ...
  ?painting wdt:P170 ?creator .
  
  # located in the Louvre
  ?painting wdt:P276 ?location .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?creatorLabel # LIMIT 2000
Try it!

GIS[edit]

Look at spatial reference system (Q161779); especially has-parts.

https://epsg.io/27700-7710

For example, World Geodetic System 1984 (Q11902211) and EPSG CRS (P1338).

geodetic reference system (Q1502887) is both an instance and a subclass of frame of reference (Q184876). spatial reference system (Q161779) is only an instance of frame of reference (Q184876); it is a subclass of coordinate system (Q11210).

Handling semi-major axis (Q171594) and inverse flattening (Q65952201) as has-parts seems strained, but maybe it is right. If an instance, then it should have the properties. If a subclass, then each instance should have the property, and the property should be restricted to a specific value. A better way would be to point to a specific ellipsoid; something like the class X is based on this item. Ah, the problem is they are not properties but rather items!

SELECT ?CRS ?CRSLabel WHERE {
  # a CRS
  # confusion about
  #   version of Q1502887
  #   instance of spatial reference system Q161779
  #   subclass of Q1502887
  ?CRS wdt:P31/wdt:P279* wd:Q161779 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
}
Try it!
SELECT ?CRS ?CRSLabel ?id WHERE {
  # a CRS that has an EPSG CRS id
  ?CRS wdt:P1338 ?id .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
}
Try it!

There is reference ellipsoid (Q1335878) (and the general Earth ellipsoid (Q1203807)).

Look for reference ellipsoids; no EPSG.

SELECT ?RE ?RELabel WHERE {
  # a Reference Ellipsoid
  ?RE wdt:P31/wdt:P279* wd:Q1335878 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
}
Try it!

France[edit]

Looking at regimes and Constitutions of France for File:Chronologie constitutions françaises.svg.

I am not getting some regimes

  1. National Constitutent Assembly, National Constituent Assembly (Q876424)
  2. Legislative Assembly, Legislative Assembly (Q780457) (replaced by National Convention!)
    • not a regime
    • no country
    • uses start time and end time
  3. Directory, French Directory (Q219817)
  4. French Third Republic, French Third Republic (Q70802)
    • republic regime in France (Q17152708) is a subclass of regime; has dates; should work
    • country is France; should work
    • has inception P571; should work
    • has abolished P576
    • historical country is preferred over republic regime of France; lower to normal rank and try again. That worked!
  5. Hundred Days, Hundred Days (Q199955) (after First Restoration)
    • instance of regime
    • no country!
    • start and end times instead of inception!
  6. Second Republic, French Second Republic (Q58326) (after July Monarchy)
    • subclass! instead of instance of republic regime in France. Fixed.
    • has country
    • has inception and abolished
  7. Government of National Defense, Government of National Defense (Q2358315) (after Second Empire)
    • instance of Government rather than regime. Added republic regime in France.
    • has country
    • has start and end times rather than inception. Add inception. Start time same as Third Republic!
SELECT ?regime ?regimeLabel ?date ?fini ?pred ?predLabel ?succ ?succLabel
{
  # instance of a regime
  # republic regime in France (Q17152708) might be better but few use it
  # some also use provisional government that is a subclass of regime
  ?regime wdt:P31/wdt:P279* wd:Q5589178 .
  
  # country is France
  # country is not quite right. some regimes do not use France
  ?regime wdt:P17 wd:Q142 .
  
  # date of inception
  # some use start date
  ?regime wdt:P571 ?date .
  
  optional {
    # abolished
    # some use end date
    ?regime wdt:P576 ?fini .

    # these are very confused because they address different territories
    # ?regime wdt:P155 ?pred .
    # ?regime wdt:P156 ?succ .
  }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?date
Try it!

Fonts[edit]

Where was the original query? There were a lot of issues with semantics.

compare

  • font (Q4868296) font whose description is "particular size, weight and style of a typeface".

see

Font classification

Instances of a typeface

Publishers

Adobe (Q11463) Adobe

Type Foundry type foundry (P4586)

Google Font ID Google Fonts ID (P10687)

SELECT ?font ?fontLabel ?publisher ?publisherLabel
{
  # instance of a type face (aka font family?)
  ?font wdt:P31/wdt:P279* wd:Q17451 .
  
  optional {
    ?font wdt:P123 ?publisher .
  }

  optional {
    ?font wdt:P4586 ?foundry .
  }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?fontLabel
Try it!

Knights Templar[edit]

SELECT ?gm ?gmLabel ?dateDeath
{
  # instance of a human
  ?gm wdt:P31 wd:Q5 .

  # gm holds the office of Grandmaster of the Knights Templar
  ?gm wdt:P39 wd:Q22673588 .

  optional {
    ?gm wdt:P570 ?dateDeath .
  }
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
  
} ORDER BY ?dateDeath
Try it!

Optical glass[edit]

SELECT ?glass ?glassLabel
{
  # an optical glass
  ?glass wdt:P279 wd:Q13326 .

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
}
Try it!

Finland[edit]

See File:Regions of Finland labelled FI.svg.

Accessing native label (P1705) for fi gets the preferred label.

SELECT ?reg ?regLabel ?cap ?capLabel WHERE {
  # region of Finland
  ?reg wdt:P31 wd:Q193512 .
  
  # find the capital
  ?reg wdt:P36 ?cap .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "fi" .} .
} ORDER BY ?regLabel
Try it!

Map projections[edit]

Wikidata is confused. The Mercator projection (Mercator projection (Q309372)) is a instance of (P31) of:

(On 1 July 2020, the instance of map projection was dropped, so the item is just a subclass of the others.)

A cylindrical projection is both an instance of and a subclass of map projection. (The cylindrical projection was also fixed on 1 July 2020.)

Is that trying to say there is a trivial cylindrical projection, and there are other, more complicated, projections? But then there should be two items: one for the instance and one for the class.

We are back to the typeface problem.

Using subclass of (subclass of (P279)) makes more sense. I have trouble with a system that leads to an instance of an instance. A map might use an instance of a Mercator projection which is itself an instance of a map projection. If I want to make a list of different map projections, then a query that asks for all instances* of a map projection would return the instance that map used. That is not the answer I want. If Mercator projection were a subclass of map projection, then I'd ask for all subclasses* of map projection. I should get the Mercator projection without specific instances of the Mercator projection.

SELECT ?item ?itemLabel
{
  # instance of a map projection
  ?item wdt:P31/wdt:P279* wd:Q186386 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .}
} ORDER BY ?itemLabel
Try it!
SELECT ?item ?itemLabel
{
  # subclass of a map projection
  ?item wdt:P279+ wd:Q186386 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .}
} ORDER BY ?itemLabel
Try it!

Instance versus subclass[edit]

One could also say that a Lambert conformal conic projection with specific parameters is an instance of the projection.

What about a projection with no parameters. Is that an instance, a subclass, or both? Maybe the simple answer is there could only be one of them (a singleton class), so it is better to call it an instance.

Is there some better way to identify an instance?

Poking around the instance or subclass issue brought up a similar subset or set or superset issue. I do not think that Wikidata distinguishes subset and subclass.

Consider items that are an instance of and a subclass of the same item.

Wikidata apparently does not include EPSG identifiers.

Query to find suspect relations[edit]

Queries to find suspect relations.

       If ?x is an instance of ?y and
       ?x is an instance of ?z and
       ?y is a subclass of ?z

Then ?x is an instance of ?z is suspect. Or rather why not find it with ?x P31/P279* ?z

Try again.

       If ?x is an instance of ?y and
       ?x is an instance of ?z and
       ?y is an instance of ?z

Then ?y might be a subclass of ?z.

Also

       if ?x is an instance of ?y and
       ?x is a subclass of ?y

Then the instance of statement is suspect.

Actors and their films[edit]

Actors (cast member (P161)) and great movies (film (Q11424), review score (P444)).

SELECT ?actor ?actorLabel ?rankLabel ?film ?filmLabel ?score ?stmtScore
{ 
  # bind the actor
  BIND (wd:Q16390 AS ?actor) .

  # there is a film
  ?film wdt:P31/wdt:P279* wd:Q11424 .

  # film has actor as a cast member
  ?film wdt:P161 ?actor .
  
  # get the film review score statement
  ?film p:P444 ?stmtScore .
  ?stmtScore ps:P444 ?score .
  # by Rotten Tomatoes
  ?stmtScore pq:P447 wd:Q105584 .
  # determination method is tomato meter
  ?stmtScore pq:P459 wd:Q108403393 .
  
  # human instead of fictional
  ?actor wdt:P31 wd:Q5 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?score
Try it!

Directors[edit]

SELECT ?director ?directorLabel ?film ?filmLabel ?date
{ 
  # bind the director
  BIND (wd:Q8877 AS ?director) .

  # there is a film
  ?film wdt:P31/wdt:P279* wd:Q11424 .
  
  ?film wdt:P577 ?date .

  # film has a director
  ?film wdt:P57 ?director .
  
  # human instead of fictional
  ?director wdt:P31 wd:Q5 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?date
Try it!

Composers[edit]

SELECT ?composer ?composerLabel ?film ?filmLabel ?date
{ 
  # bind the composer
  BIND (wd:Q131285 AS ?composer) .

  # there is a film
  ?film wdt:P31/wdt:P279* wd:Q11424 .
  
  ?film wdt:P577 ?date .

  # film has a composer
  ?film wdt:P86 ?composer .
  
  # human instead of fictional
  ?composer wdt:P31 wd:Q5 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?date
Try it!

TV[edit]

Who has the most appearances? television series (Q5398426)

Do a GROUP BY with a COUNT?

Bea Benaderet (Q1285376)

Multiple awards[edit]

Looking for EGOT. .

More problems with instance and subclass...

SELECT ?actor ?actorLabel
{ 
  # human instead of fictional
  ?actor wdt:P31 wd:Q5 .
  
  # occupation is an actor
  ?actor wdt:P106/wdt:P279* wd:Q33999 .
  
  # Best Actor Oscar
  #  best actor is an instance of Academy Awards Q19020!
  ?actor wdt:P166 wd:Q103916 .
  
  # Golden Globe
  ?actor wdt:P166/wdt:P279* wd:Q1011547 .
  
  # Tony Award
  #  best actor is an instance of Tony Awards Q191874 rather than a subclass!
  # ?actor wdt:P166/wdt:P279* wd:Q191874 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?actorLabel
Try it!

District Attorneys[edit]

district attorney (Q653368) is a subclass of prosecutor (Q600751)

Should there be a California DA class?

The office should have an associated county. See w:List of district attorneys by county.

This query finds DAs in LA and Santa Clara counties.

SELECT ?attorney ?attorneyLabel ?jurisdictionLabel
{
  # find someone who holds a position
  ?attorney wdt:P39 ?position .
  
  # the position is a subclass of district attorney
  ?position wdt:P279* wd:Q653368 .
  
  # the position has a jurisdiction
  ?position wdt:P1001 ?jurisdiction .
            
  # jurisdiction is a county in California
  ?jurisdiction wdt:P31 wd:Q13212489 . 
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?jurisdictionLabel
Try it!

Fix a bunch of DAs..

Standard Model[edit]

Standard Model

No clear queries.

SELECT ?particle ?particleLabel
{
  # find a particle
  ?particle wdt:P279+ wd:Q43116 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?particleLabel
Try it!

Body shape[edit]

Body shapes
Body types

Query uninteresting; returns male and female shapes....

SELECT ?shape ?shapeLabel
{
  # find a particle
  ?shape wdt:P279+ wd:Q1072278 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?shapeLabel
Try it!

But there is

And

Pirates[edit]

SELECT ?pirate ?pirateLabel
{
  # occupation a pirate
  ?pirate wdt:P106 wd:Q10729326 .

  # a human
  ?pirate wdt:P31 wd:Q5 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?pirateLabel
Try it!

Serial killers[edit]

SELECT ?killer ?killerLabel
{
  # occupation a serial killer
  ?killer wdt:P106 wd:Q484188 .

  # a human
  ?killer wdt:P31 wd:Q5 .

  # country of citizenship: US
  ?killer wdt:P27 wd:Q30 .
  
  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?killerLabel
Try it!

Antibiotics[edit]

Query does not have good coverage.... Class versus instance problem.

SELECT ?antibiotic ?antibioticLabel
{
  # occupation a pirate
  ?antibiotic wdt:P31/wdt:P279* wd:Q12187 .

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?pirateLabel
Try it!

NFL teams[edit]

There are 32 current NFL teams. See w:National_Football_League_team_captains.

Query returns 20 (gets old teams such as Brooklyn Dodgers). Buffalo Bills are missing. It has league (P118) being American Football League (Q464508) for a time and then National Football League (Q1215884) That gives better query result: 54 teams.

Solved by filtering out dissolved teams.

Asking for head coach gets only 13 items with some duplicates. Need to filter for start and end time. See Kansas City Chiefs and Andy Reid.

Why not instance of NFL Americal Football Team?

SELECT ?team ?teamLabel ?coach ?coachLabel
{
  # instance of American football team
  ?team wdt:P31 wd:Q17156793 .
  
  # member of National Football League
  # ?team wdt:P463 wd:Q1215884 .

  # league is NFL
  ?team wdt:P118 wd:Q1215884 .
  
  FILTER NOT EXISTS {
    # no dissolved date
    ?team wdt:P576 ?date .
  }
  
  optional {
    # head coach
    ?team wdt:P286 ?coach .
  }

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?teamLabel
Try it!

Animals[edit]

These items are a surprise. I expected some properties...

animal with specific gender (Q116742203)

Also groups: herd of cattle, pride of lions

bear, , , cub

cat, , , kitten

cattle, bull, cow, heifer, calf

deer, stag/buck, doe, fawn

dog, , , puppy

duck, drake, , duckling

lion, lion, lioness, cub

seal, , , pup

Musical instruments[edit]

Not what I expected.

MIMO's classification of musical instrument (Q26836418)
Guizzi's classification of musical instruments (Q53424891)
Hornbostel–Sachs (Q496327)

Violin: violin (Q8355)

Oboe: oboe (Q8377)