SQL简单学习

0、select

select
  t1.uid,
  -- uid
  t1.cuid,
  -- cuid
  t1.ext -- 扩展字段
from
  feed_sample_easylog t1
where
  t1.event_day = '20220418' -- 用作partition的日期 and uid = 
limit
  100

 

 

1、join 

select
  *
from
  (
    select
      *
    from
      feed_sample_easylog
    where
      event_day = '20220418'
      and event_hour = '10'
  ) t1
  inner join (
    select
      *
    from
      tmp_minjie_20220411_20220417_20220420195201
  ) t2 on t1.cuid = t2.cuid
  and t1.nid = t2.nid
  and t1.request_id = t2.logid;

 

posted @ 2022-04-21 16:18  乐乐章  阅读(20)  评论(0编辑  收藏  举报