mysql - 从表中找到至少在这些技术[reactjs, mysql, express] 方面工作过的人
问题描述
我有一个包含名称和技术字段的表。
-----------------------------
|name | technologies |
-----------------------------
|shashin | reactjs |
-----------------------------
|shashin | mysql |
-----------------------------
|krupali | express |
-----------------------------
|paras | mysql |
-----------------------------
|shashin | express |
-----------------------------
|paras | php |
-----------------------------
|krupali | php |
-----------------------------
|shashin | php |
-----------------------------
我想找一个至少在所有这些技术[reactjs, mysql, express] 中工作过的人名。
输出:
-------------
|name |
-------------
|shashin |
-------------
解决方案
您可以尝试如下。
select name from TableName
group by name
having count(distinct technologies) > 2
如果你想要特定的技术,你可以尝试如下。
select name from TableName
where technologies in('reactjs', 'mysql', 'express')
group by name
having count(distinct technologies) > 2
推荐阅读
- javascript - Fabricjs 让我只旋转和编辑第一个点击的图像
- pycharm - 使用pycharm2019 jupyter notebook打开.ipynb文件,窗口无法交互卡住
- selenium-webdriver - 自动化脚本运行时如何处理“接受 Cookie”消息
- react-native - 为多个系列添加不同的工具提示值
- java - 如何通过 youtubeExtractor 的 youtube 链接为 ExoPlayer 创建 MediaSource
- r - Julia:使用 RData.jl 加载 rds 文件会占用大量内存
- documentation - 如何 doxygen 记录函数的未命名参数?
- c++ - 调用 avcodec 接收 h264 时出现 FFmpeg AVERROR(EAGAIN) 错误
- c++ - 为什么 fstream 打不开文件?
- algorithm - 计算插入排序的时间复杂度