Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm looking to complete my code but I can't figure out what's wrong. I originally had some working code using only two tables now that I'm JOINING three tables I can't figure it out.
I'm looking to keep the tables as is but find the Previous Date that a songs was played, then once that's found count those shows between the current show date and previous date. Right now the Previous date finds the previous show date but not based on individual song_id. Which is what I'm trying to do. If it would help here's my original code for the Previous Date based on only two tables. ORIGINAL CODE


My current code is here but I can't figure out why it's not finding the correct dates and counts.
http://sqlfiddle.com/#!2/0eb62/75

If anyone can help that'd be much appreciated!!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900