【问题标题】:how to get the rest of the positions on my position table如何获得我的位置表上的其余位置
【发布时间】:2023-02-18 15:26:43
【问题描述】:

大家好,我正在尝试在我的桌子上获得完整的计数,因为现在它只显示一个位置而不是 5 如果有人可以提供帮助,我将不胜感激

select position_name, state,count(*) -> from positions -> join employees on (employees.position_id = positions.position_id) -> ;

我正在尝试获取每个州所有职位的表格计数。

【问题讨论】:

    标签: mysql


    【解决方案1】:
    select position_name, state, count(*)
    from positions
    join employees on employees.position_id = positions.position_id
    group by position_name, state
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-19
      • 2017-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多