[DMDB] Some more notes

This commit is contained in:
2026-03-01 13:14:12 +01:00
parent 0a8462e1b7
commit af1208bed4

View File

@@ -3,13 +3,16 @@
\texttt{FROM table d, table2 c} & selects the target tables. Can use range variables (\texttt{d, c} here) \\ \texttt{FROM table d, table2 c} & selects the target tables. Can use range variables (\texttt{d, c} here) \\
\texttt{WHERE} & Filter results. Can also target non-acquired columns \\ \texttt{WHERE} & Filter results. Can also target non-acquired columns \\
\texttt{DISTINCT} & Returns elements without duplicates \\ \texttt{DISTINCT} & Returns elements without duplicates \\
\texttt{IN} & Checks if the element is present in subquery \\
\texttt{UNION} & Set union (also removes duplicates) \\ \texttt{UNION} & Set union (also removes duplicates) \\
\texttt{INTERSECT} & Set intersection \\ \texttt{INTERSECT} & Set intersection \\
\texttt{EXCEPT} & Set difference \\ \texttt{EXCEPT} & Set difference \\
\texttt{JOIN} & Join tables, always requires a ON clause \\ \texttt{JOIN} & Join tables, always requires a ON clause \\
\texttt{DATE} & Used to do comparisons against fixed Dates (followed by Datesting) \\ \texttt{ON} & Specify on which column with what condition to join the tables \\
\texttt{DATE} & Used to do comparisons against fixed Dates (followed by Datestring) \\
\texttt{AS} & Rename a column \\
\texttt{AVG(column)} & Computes the average of the specified column \\ \texttt{AVG(column)} & Computes the average of the specified column \\
\texttt{SUM(column)} & Computes the sum of the specified column \\ \texttt{SUM(column)} & Computes the sum of the specified column \\
\end{tables} \end{tables}
We can directly add new columns to our result using statements like (also note that we do not actually return salary and employment columns) We can directly add new columns to our result using statements like (also note that we do not actually return salary and employment columns)