Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.75 KB | None | 0 0
  1. select*
  2. from hallgatok
  3. where telepules='Tata'
  4.  
  5. select*
  6. from jegyek
  7. where vdatum='2007.01.10'
  8.  
  9. select count(*)
  10. from hallgatok
  11.  
  12. select count(*) as 'Hallgatók száma'
  13. from hallgatok
  14.  
  15. select tkov, count(tkov)
  16. from tantargyak
  17. group by tkov
  18.  
  19. select*
  20. from hallgatok
  21.  
  22. select*
  23. from hallgatok
  24. where nev like'%Péter%'
  25.  
  26. select count(uv) as 'uv-s hallgatók száma'
  27. from jegyek
  28. where uv !=0
  29.  
  30. select case kforma
  31. when 1 then 'BSC'
  32. when 2 then 'MSC'
  33. when 3 then 'PHD'
  34. else 'kodhiba'
  35. end as 'Képzési forma',
  36. count (*) as 'Hallgatók száma'
  37. from hallgatok
  38. group by kforma
  39.  
  40. select nev, j.neptun, AVG(cast (jegy as float)) as'Átlag'
  41. from hallgatok h
  42.     inner join
  43.     jegyek j
  44. on h.neptun=j.neptun
  45. group by nev,j.neptun
  46. order by AVG(jegy)desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement