Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

find how many store dont buy a product as required conditions

$
0
0

Hi friends,

I have 2tables Order( ORderdate, Product_ID, Quantity, Store_ID)

and table Store(Store_ID, StoreName)

I need to count how many store that didnt order Product"A" 2 consecutive days from the fist day of month up to today!.

I think that i need to use datebetween function to calculate the days between 2 order times of each store but i am unable to do that because a store can buy product"A" in different dates and i didnt know the startdate and enddate !...

Could anyone give me some advices on my issue?

 

Regards,
J.


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>