Commit 84bba92c authored by Marcel Huber's avatar Marcel Huber
Browse files

replaced hardcoded query names with {query_name} attribute

parent 5540c0d4
......@@ -11,6 +11,7 @@ include::../ADocGitlabVars.asc[]
:imagesoutdir: {imagesdir}
:queryoutputfile: ColumnStore.MonetDB.log
:queryoutputfilepg: ColumnStore.PostgreSQL.log
:dropdatascript: ../Databases/dvdstore_500mb/6_dropAllData.monetdb.sql
== Zielsetzung
......@@ -104,7 +105,7 @@ Führen Sie die nachfolgenden Queries aus und
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -135,7 +136,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-id1000-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -166,7 +167,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-idrange-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -197,7 +198,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-agerange-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -228,7 +229,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtZ-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -259,7 +260,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtN-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -290,7 +291,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -321,7 +322,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtZ-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -352,7 +353,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-stateAR-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -383,7 +384,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=title-price-products-subselect-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -417,7 +418,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=income_avg-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -448,7 +449,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=customerid_max-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -479,7 +480,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=city-customerid_count-customers-between-groupby-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -510,7 +511,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=city-customerid_count-income_sum-customers-between-groupby-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -541,7 +542,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=orderid-orderlineid-orderlines-limit30-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -572,7 +573,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-id3-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -603,7 +604,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-lineid8-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -634,7 +635,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-id1-lineid1-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -665,7 +666,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=orderid-quantity_sum-orderlines-orderid_lt20-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -696,7 +697,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-orderlines-lineid_gt6-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -727,7 +728,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-quantity_sum-orderlines-lineid_gt6-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -758,7 +759,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-quantity_sum-orderlines-lineid_gt10-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -791,7 +792,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-products-titlelike-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -820,12 +821,12 @@ endif::exercise_solution[]
=== Aufgabe {counter:ex_number}: Join-Queries
:query_name: simple-join
:query_name: simple-query
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=simple-query-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -856,7 +857,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=nested-loop-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -887,7 +888,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=non-equi-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -918,7 +919,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=grouped-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -949,7 +950,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=grouped-join-reduced-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -980,7 +981,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-exists-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1011,7 +1012,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-distinct-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1042,7 +1043,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-having-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1073,7 +1074,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-cte-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1104,7 +1105,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-cte-subselect-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......
......@@ -11,6 +11,7 @@ include::../ADocGitlabVars.asc[]
:imagesoutdir: {imagesdir}
:queryoutputfile: ColumnStore.MonetDB.log
:queryoutputfilepg: ColumnStore.PostgreSQL.log
:dropdatascript: ../Databases/dvdstore_500mb/6_dropAllData.monetdb.sql
== Zielsetzung
......@@ -104,7 +105,7 @@ Führen Sie die nachfolgenden Queries aus und
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -135,7 +136,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-id1000-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -166,7 +167,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-idrange-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -197,7 +198,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-agerange-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -228,7 +229,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtZ-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -259,7 +260,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtN-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -290,7 +291,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -321,7 +322,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-gtZ-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -352,7 +353,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=lastname-firstname-customers-stateAR-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -383,7 +384,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=title-price-products-subselect-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -417,7 +418,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=income_avg-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -448,7 +449,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=customerid_max-customers-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -479,7 +480,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=city-customerid_count-customers-between-groupby-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -510,7 +511,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=city-customerid_count-income_sum-customers-between-groupby-orderby-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -541,7 +542,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=orderid-orderlineid-orderlines-limit30-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -572,7 +573,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-id3-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -603,7 +604,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-lineid8-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -634,7 +635,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-orderlines-id1-lineid1-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -665,7 +666,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=orderid-quantity_sum-orderlines-orderid_lt20-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -696,7 +697,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-orderlines-lineid_gt6-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -727,7 +728,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-quantity_sum-orderlines-lineid_gt6-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -758,7 +759,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=count-quantity_sum-orderlines-lineid_gt10-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -791,7 +792,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=star-products-titlelike-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -820,12 +821,12 @@ endif::exercise_solution[]
=== Aufgabe {counter:ex_number}: Join-Queries
:query_name: simple-join
:query_name: simple-query
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=simple-query-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -856,7 +857,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=nested-loop-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -887,7 +888,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=non-equi-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -918,7 +919,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=grouped-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -949,7 +950,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=grouped-join-reduced-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -980,7 +981,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-exists-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1011,7 +1012,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-distinct-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1042,7 +1043,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-having-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1073,7 +1074,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-cte-join-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......@@ -1104,7 +1105,7 @@ endif::exercise_solution[]
.[#{query_name}]#Q{counter:query_number} {query_name}#
[source,sql]
----
include::{queryoutputfilepg}[tags=cat11-cte-subselect-query]
include::{queryoutputfilepg}[tags={query_name}-query]
----
ifdef::exercise_solution[]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment