Advertisement
horozov86

Task 12 - SQL

Oct 4th, 2024
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.65 KB | None | 0 0
  1. SELECT DISTINCT
  2. TOURNUMMER AS "Tour number",
  3. LKWKZ AS "Truck number",
  4. ANHAENGERKZ AS "Trailer number",
  5. PREISVORGABEBETRAGGS AS "Tour price",
  6. ASDGAB.BETRAG AS "Amount",
  7. SW.ISOWAEHRUNGSCODE AS "Currency tour amount",
  8. SABRZWECK.BEZEICHNUNG AS "Calculation purpose"
  9.  
  10.  
  11.  
  12. FROM ATOUR
  13.  
  14. LEFT JOIN
  15.     ATASEND ON ATOUR.NR = ATASEND.TOURNR
  16. LEFT JOIN
  17.     ASDGABRECHNUNG ASDGAB ON ATASEND.NR = ASDGAB.ATAID
  18. LEFT JOIN
  19.     SWAEHRUNG SW ON SW.ID = ATOUR.PREISVORGABEWAEHRUNGIDGS
  20. LEFT JOIN
  21.     atafrachtzahler ON Atour.NR = atafrachtzahler.tournr
  22. LEFT JOIN
  23.     SABRZWECK ON SABRZWECK.ID = atafrachtzahler.ABRZWECK
  24. WHERE
  25.     ATOUR.TOURNUMMER IN (425608);
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement