回覆列表
  • 1 # 一根蒜薹

    1 select UName,

    2 (select AVG(Grades) from UserInfo where GName = "語文") as "語文",

    3 (select AVG(Grades) from UserInfo where GName = "數學") as "數學",

    4 (select AVG(Grades) from UserInfo where GName = "英語") as "英語"

    5 from UserInfo

    6 where UName = "小明"

    7 group by UName

    8 /*having GName = "語文" and GName = "數學" and GName = "英語"*/

    9 order by AVG(Grades)

    10 go

  • 中秋節和大豐收的關聯?
  • 10歲兒童天生舌頭肥大發音不準能治嗎?