我有两个表,一个叫做许可证,一个叫做系统。 现在许可证表包含系统 ID 和许可证类型(完整或试用)。 系统表保存系统 mac_address。
现在一个系统可能有多个试用许可证和一个完整许可证。 现在我想找到尚未生成完整版本的系统,并将它们与它们的 mac_address 一起分组。
请提出一点建议就足够了。
最佳答案
select
s.*
from
systems as s
where
s.system_id not in
(select l.system_id from licenses as l where l.licence_type='full')
关于php - 查找非重复记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11576688/