Advertisement
GalookCZ

takes forever

Mar 20th, 2021
1,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.83 KB | None | 0 0
  1. SELECT
  2. *,
  3. ockovani_all.misto_nazev,
  4. ockovani_all.vekova_skupina,
  5.  
  6. (ockovani_lastweek.total + ockovani_all.total * 0.2 ) * 0.001 as ockovani_total,
  7. (ockovani_lastweek.total / ockovani_all.total) * 10 as ockovani_pomer,
  8.  
  9. ockovani_lastweek.total as w_total,
  10.  
  11. (registrace_all.rezervace / registrace_all.total) * 10 as registrace_rezervace_pomer,
  12.  
  13. registrace_lastweek.average_wait_time * -0.5 as waitTime,
  14. registrace_all.average_wait_time * -0.25 as w_waitTime
  15.  
  16.  
  17.  
  18. FROM ockovani_all, ockovani_lastweek, registrace_all, registrace_lastweek
  19.  
  20. WHERE ockovani_all.misto_id = ockovani_lastweek.misto_id = registrace_lastweek.misto_id = registrace_all.misto_id AND
  21.  
  22. ockovani_all.vekova_skupina = ockovani_lastweek.vekova_skupina = registrace_all.vekova_skupina = registrace_lastweek.vekova_skupina
  23.  
  24.  
  25. ORDER BY registrace_all.misto_nazev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement