Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8604

Re: Join multiple Tables and apply function group by function

$
0
0

Does your inner Select statement work standalone?

 

(SELECT

     session_id, s.sha256,

     create_date AS sample_time,

     t.create_time AS session_time,

     t.filename, h.pid AS WF_ID,

     MIN(build_version) AS build_version

 

  FROM session t

 

  INNER JOIN sample s ON t.sha256 = s.sha256

  INNER JOIN mid_2_sid m ON s.mid =m.mid     

  INNER JOIN release_history h ON m.sid = h.sid

      GROUP By sha256,s.mid,m.sid, create_date,create_time,filename) 

 

To include the aggregate function Min you should have all the object (except build version )in the select clause in group by


Viewing all articles
Browse latest Browse all 8604

Trending Articles