Datenexporte: Instagram-Locationprojekt, Teil (1)

(1) Locationrecherche nach Auflistung der aktiven Accounts

SELECT location, Anz_user from(
Select location, count(username) as Anz_user from locations GROUP BY location ) as my_table
WHERE (Anz_user >= 2) order by Anz_user DESC

Diese Abfrage listet alle Locations auf, wo mind. 2 Accounts Postings abgesetzt hatten.
Datei (Paris): loc_2

(2) Locationrecherche nach Auflistung der aktiven Accounts, Anpassung nach Locationtyp

SELECT location as Ort, Anz_user from(
Select location, count(username) as Anz_user from locations GROUP BY location ) as my_table
WHERE (Anz_user >= 2) AND (location like '%museum%') order by Anz_user DESC

Diese Abfrage listet alle Locations auf, wo mind. 2 Accounts Postings abgesetzt hatten und erlaubt die Feinprüfung auf Locationtyp.
Datei (Paris), Hotel: loc_2_hotel
Datei (Paris), Museum: loc_2_museum

(3) Location- und Accountauflistung nach Suchwort (Tagsubstring)
select location, tag, username from locations where tag like '%fashion%' group by username;

Diese Abfrage listet alle Locations und Accounts auf, welche etwas zu „Fashion“ gepostet hatten
Datei (Paris), „fashion“: paris_fashion

(4) Userauflistung nach Suchwort UND Mindestaufkommen in Bezug auf die Locationaufsummierung

SELECT username, numb from(
Select username, tag, count(location) as numb from locations GROUP BY username ) as my_table
WHERE (numb >= 2) and (tag like '%fashion%') order by numb DESC;

Diese Abfrage listet alle erfassten Accounts auf, welche an mind. 2 Locations aktiv etwas zu „Fashion“ schrieben.
Datei (Paris), Loc=2, „fashion“: user_tag_fashion_2

Schreibe einen Kommentar