Skip to content
Snippets Groups Projects
Commit 36b0e1f6 authored by iso's avatar iso
Browse files

Replace tables.sql

parent 2b0c83b0
No related branches found
No related tags found
No related merge requests found
......@@ -44,4 +44,23 @@ CREATE TABLE public."tweetedWith"
CONSTRAINT "FremdschluessselTweetedWith2" FOREIGN KEY ("Hashtag2")
REFERENCES public."Hashtag" (text) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)
\ No newline at end of file
)
\\ Zur Abfrage für die Relation tweetedWith (mit pgadmin exportiert und dann wieder importiert)
SELECT
DISTINCT h1.text,
h2.text
FROM
public.has h1,
public.has h2
WHERE
h1."ID" = h2."ID" AND
h1.text != h2.text;
\\ Zur Abfrage für die Relation Hashtag (mit pgadmin exportiert und dann wieder importiert)
SELECT
has.text,Count(has.text) as amountTweets
FROM
public.has
GROUP BY
has.text;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment