Most popular product titles to attract first-time buyers
<p>Suppose I have a table with a DateTime column called purchase_time and other order details (store_id, buyer_id, item_id, value) and I want to find what buyers purchased most often during their first purchase product name. </p>
<p>So far I've done this, but how do I find the most popular items? </p>
<pre class="brush:php;toolbar:false;">select store_id, from transactions
where purchase_time in (select min(purchase_time)
from transactions c1 group by c1.store_id);</pre></p>