SELECT COUNT(DISTINCT mydate) FROM mytable mt1 ; WHERE myvalue = "A" ; AND NOT EXISTS (SELECT * FROM mytable mt2 ; WHERE mt2.mydate = mt1.mydate ; AND mt2.myvalue <> mt1.myvalue )>I have a table with multiple records per date, and I need to know the number of days in order, for which all occurances equal a given value. I've found a few half answers, but they're not adding up to a whole.
>8/21 A >8/21 P >8/22 A >8/22 A >8/23 A >8/23 A >>