当前位置:数据库 > Oracle >>

oracle从分组中找出某个值,分组中是否包含某个值

oracle从分组中找出某个值,分组中是否包含某个值
 
Oracle 
SELECT
    MIN(created_timestamp),
    MAX(resource_id),
    MAX(price),
    MIN(CASE WHEN event_type IN (1704, 1701, 1703) 
                 THEN found_value 
             WHEN event_type = 1707 
                 THEN 1707 
                 ELSE NULL 
        END)
FROM subscriptions
GROUP BY guid ;

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,