Good day,

 

I have a question for you SQL boffins, how can I query a table to get the
count of consecutive days found ?

 

A Table contains rows with dates where an item(s) has been added for every
day this item was used.  

 

i.e.

 

itemnr                  dateused

abc                         2017/02/01

abc                         2017/02/02

abc                         2017/02/25

abc                         2017/02/25

abc                         2017/02/25

abc                         2017/02/26

abc                         2017/02/27

abc                         2017/02/28

abc                         2017/03/01

abc                         2017/03/02

 

The result from above sample should be 6 as there is a break between
2017/02/02 and 2017/02/25?

 

Regards

 

Stef



[Non-text portions of this message have been removed]

  • [firebird-s... 'Stef' s...@autotech.co.za [firebird-support]
    • Re: [f... 'Ismael L. Donis Garcia' sli...@natio.co.cu [firebird-support]
    • RE: [f... 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
    • RE: [f... 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
      • RE... 'Stef' s...@autotech.co.za [firebird-support]
        • ... 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
    • Re: [f... setysvar setys...@gmail.com [firebird-support]
      • RE... 'Stef' s...@autotech.co.za [firebird-support]
        • ... Svein Erling Tysvær setys...@gmail.com [firebird-support]
          • ... Svein Erling Tysvær setys...@gmail.com [firebird-support]
          • ... 'Stef' s...@autotech.co.za [firebird-support]

Reply via email to