美文网首页
SQL Basics: Simple JOIN with COU

SQL Basics: Simple JOIN with COU

作者: 是不及呀 | 来源:发表于2019-05-13 16:50 被阅读0次
    * *
    链接 SQL Basics: Simple JOIN with COUNT
    难度 7kyu
    状态
    日期 2019-5-13

    题意

    题解1

    select people.id , people.name , count(toys.id) as toy_count
    from people
    left join toys
    on people.id = toys.people_id
    group by people.id

    相关文章

      网友评论

          本文标题:SQL Basics: Simple JOIN with COU

          本文链接:https://www.haomeiwen.com/subject/qsdraqtx.html