[19:41:38] Hoping someone can help with my previous questions.... thanks in advance. [19:54:20] I can scroll back for days, and not see a question [19:54:55] Odd, I asked it yesterday. I went though the tutorial page and have a better understanding, but still missing some pieces. First, what is SAMPLE in SPARQL? [19:55:10] Also, I am having trouble, modifying that example to show all nominees for Academy Awards (not just the winners), any help anyone can provide would be greatly appreciated. [19:55:22] https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples#Academy_award_data [19:58:38] I tried swapping out the award id for the nomination id, but I dont [19:58:59] think that it is an instance? Adminttedly, I am new at this so I could be way off base. [21:33:15] Reedy: Did it show up that time? [21:47:38] It did [21:48:23] Ok, good. Not trying to be pushy. :-) Just want to make sure it went out. [21:59:05] FWIW, if you don't get a reply on IRC after quite a few hours, it's good practice (and not bad manners) to try repeating your question, as different people might be paying attention now [22:00:51] Yeah, that is why I repeated it. But then I was confused that you said you didn't get it. [22:01:38] I am not in a hurry (good thing), but when someone is feeling magnanimous enough to help, I will hopefully be here. [22:02:54] malachiclark[m]: SAMPLE is when you use aggregation (GROUP BY) and want to get an arbitrary value for one of the variables that is not grouped-by [22:03:14] malachiclark[m]: for example, GROUP BY ?age then you could SAMPLE(?person) to get a "random" person for each age [22:03:32] Interesting. [22:04:15] So for the example, it is SAMPLE-ing 4 items, ?human, ?director, ?awardEdition and ?time [22:04:46] But not the others. So what is it used for in that example? [22:05:05] Since I don't want any director, I want the one of that particular film. [22:05:06] it is not sampling ?award and ?awardWork because that's what we're grouping by [22:07:51] malachiclark[m]: so here, for each award/awardWork, it picks a random human that received that award for that work [22:08:56] the SAMPLE is necessary because there might be more than one person who received that award for that work, but we can only show one result for each award/awardWork combo (since we GROUP BY that) [22:09:14] Ah, because more than one person might be awarded (but usually it is just one)? [22:09:54] Yes, ok, I think I got it. [22:10:00] yes. also the ?director is any ?director of the work that was awarded (but probably usually there is also just one director) [22:10:01] Thank you. [22:10:36] Now I just need to figure out how to change it to nominees. I keep messing with it, but breaking it. [22:13:01] malachiclark[m]: I think you just need to replace P166 (awarded) by P1411 (nominated for) in the whole query [22:13:07] I tried replacing wd:Q19020 with P6150 and P166 with P1411 but it doesn't work. [22:14:03] bennofs: Hey, that might have worked! [22:14:07] malachiclark[m]: yeah, that won't work, since P6150 is a property, and there won't be any statements like "nominated for 'Academy Awards Database nominee ID'" [22:14:24] Why don't I need P6105? Isn't that the list of nominees? [22:14:42] Oh! Nominated for the ID specifically. That is the problem? [22:15:02] it's a property that describes the id of nominated persons [22:15:21] Hmm.. I think I get it. [22:17:24] malachiclark[m]: for example, look at https://www.wikidata.org/wiki/Q171736. He has a statement "Academy Awards Database nominee ID <68>", but there is no statement "nominated for " [22:21:20] Ah.... I think I am beginning to understand. I was really stuck on the P6105 being the key. Didn't think the other way. [22:21:31] Thank you very much for the clarification. [22:22:48] It seems like my query is missing results though. [22:23:06] I only see two movies listed for nominated for best picture. I am sure there was more than 2. [22:24:29] wikidata data is always incomplete, so it might be that the data is just missing [22:24:37] For this year at least. Previous years seem to show more entries. [22:24:55] Oh, the query is fine, it is just missing the base data. [22:25:08] Is it hard for me to add it? [22:26:17] malachiclark[m]: that should be quite easy. if you know some person who got nominated, just go to the wikidata page and click on the "+ add statement" link to add a statement for P1411 [22:27:01] It is that easy? I hope someone double checks these things..... [22:28:38] some very popular pages are protected, but apart from that, yes. I think you can watch pages though, so some people may get notified of your edit. Also, that's why wikidata likes to have references to statements [22:29:15] Oh, the all the nominees come from the academy website. [22:29:51] Like could I edit the label on this: https://www.wikidata.org/wiki/Q27894574 [22:30:21] It seems to be the only "film" in the entire Academy Award list, that has the word "film" in the label. Others don't. [22:30:59] Or is that to disambiguate it from the song? [22:33:40] Which doesn't make sense either, there is a movie name "Glory" Q862317 and a song named "Glory" Q5571565 [22:35:43] from my experience, if there's 10 ways to do things, in wikidata you'll find all of them. That's just what happens if you have a collaboratively edited wiki [22:36:24] Ah, gotcha. Then I have to do post-processing of the data after retrieval. Boo.