我有一个包含名称和技术字段的表.
-----------------------------
|name | technologies |
-----------------------------
|shashin | reactjs |
-----------------------------
|shashin | mysql |
-----------------------------
|krupali | express |
-----------------------------
|paras | mysql |
-----------------------------
|shashin | express |
-----------------------------
|paras | php |
-----------------------------
|krupali | php |
-----------------------------
|shashin | php |
-----------------------------
Run Code Online (Sandbox Code Playgroud)
我想找到一个至少在所有这些技术中起作用的人名[reactjs,mysql,express].
OUTPUT:
-------------
|name |
-------------
|shashin |
-------------
Run Code Online (Sandbox Code Playgroud)
你可以尝试以下.
select name from TableName
group by name
having count(distinct technologies) > 2
Run Code Online (Sandbox Code Playgroud)
如果你想要特定的技术,你可以尝试以下.
select name from TableName
where technologies in('reactjs', 'mysql', 'express')
group by name
having count(distinct technologies) > 2
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
94 次 |
| 最近记录: |