View Single Post
  #4  
Old January 5th, 2010, 06:20 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default winning streak query

Indeed, you need to add the proposed HAVING clause in that case

To get only one day, replace myData (deep most query) by a query that will
limit the data to that one day, something with WHERE
DateValue(gameDateTimeStamp) = someDate.

To get losing streaks, replace isWin by NOT isWin (2 places in the deep
most query).

As long as the couple (playerID, gameDateTimeStamp) has no dup, the logic
stands, even if there are many games with the same datetime stamp. It won't
if the same player can be in many simultaneous games, like a chess master
player playing simultaneous chess games.



Vanderghast, Access MVP

"Clifford Bass via AccessMonster.com" u48370@uwe wrote in message
news:a1aa817b9720f@uwe...
Hi,

Interesting solution. I will have to look at it some more to totally
understand it.

Under the presumption from pat67's examples that a steak is three or
more wins/loses I think you will want to add "HAVING MAX(streak) = 3" to
the
final query. Your data set would need to be expanded or adjusted if there
are multiple, simultaneous games happening. Also, I think pat67 wanted
both
winning and losing streaks. And I think the streaks were streaks on a
particular day, not over multiple days.

pat67: correct me if I am wrong there.

Clifford Bass

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201001/1