diff --git a/Scripts/DatasetMerging/SQL_Queries/query.sql b/Scripts/DatasetMerging/SQL_Queries/query.sql index 150afce..2dc7f2a 100644 --- a/Scripts/DatasetMerging/SQL_Queries/query.sql +++ b/Scripts/DatasetMerging/SQL_Queries/query.sql @@ -43,3 +43,12 @@ INSERT INTO Subjects_Abbreviations(SubjectID, AbbreviationID) VALUES (?,?); -- Please be sure it is a URI before running this query -- and take at least until the domain and the first path part SELECT AbbreviationID FROM Abbreviations WHERE URI LIKE ?; + +-- Query to retrieve data +SELECT MovieID, GROUP_CONCAT('' || '' || SubjectURI || '' || RelationshipURI || '' || ObjectURI || '', '') as RDF_String, Abstract +FROM RDFs +INNER JOIN Subjects USING (SubjectID) +INNER JOIN Relationships USING (RelationshipID) +INNER JOIN Objects USING (ObjectID) +INNER JOIN WikipediaAbstracts USING (MovieID) +GROUP BY MovieID;