I like Serena
Science Advisor
Homework Helper
MHB
- 16,335
- 258
mathmari said:Why do we need the DISTINCT only at the first query, without EXISTS ?
The query with EXISTS will find a name once if there exists at least 1 employee in Nurnberg that helped them.
Suppose there are 2 employees in Nurnberg that helped a particular customer.
Then the query with EXISTS will find the customer once, but the first query will find the customer twice. (Worried)
Yep. (Nod)mathmari said:So we create a table that includes that data that we want and then we print the column of this table as usual, right?
We may want to pick a VIEW that makes sense to have, such as one with all "interesting" columns from teilestamm and lager.
Then we can have a SELECT query that selects a specific column from it.