AnsweredAssumed Answered

FQL Question

Question asked by Hudi on May 23, 2014
Latest reply on Jun 8, 2014 by beverly

Hi,

 

I need some help writing an sql statement to find out how many times an album was quoted during the current week. Two tables ALBM and QLI ( quote lineItem) that need to be joined.

 

What I'd like to see is this:

 

sample album - 2

sample album xyz - 4

another album - 1

a different album - 7

etc.

 

 

 

ExecuteSQL (

 

“SELECT CDTitle, COUNT (QLI.id)

 

FROM ALBM

 

WHERE QLI.date_created ≤ ? and QLI.date_created ≥ ?

 

LEFT JOIN QLI on id_album = QLI.id

 

GROUP BY QLI.id

 

"

; "" ; "" ; $_weekstart ; $_weekend )

 

 

Thanks a ton!

Outcomes