diff --git a/scripts/.create_tables.sql.swp b/scripts/.create_tables.sql.swp new file mode 100644 index 0000000..e188795 Binary files /dev/null and b/scripts/.create_tables.sql.swp differ diff --git a/scripts/select_quote_cats.sql b/scripts/select_quote_cats.sql new file mode 100644 index 0000000..e42318e --- /dev/null +++ b/scripts/select_quote_cats.sql @@ -0,0 +1,7 @@ +\echo JOIN quotes TO categories: +SELECT LEFT(qtext, 50) AS "Quote", description AS "Category" +FROM quote +JOIN quotecategory +ON quote.qid = quotecategory.qid +JOIN category +ON quotecategory.cid = category.cid;