I have a table foo which has the record like this:
id name
1 XXXXX
2 YYYYY
3
4
select count(*) as cntall, count(name) as cntname from foo
The result of the above query is:
cntall cntname
4 2
The power within Firebird...
(EXTRACT(YEARDAY FROM D) - EXTRACT(WEEKDAY FROM D-1) + 7) / 7It can give us the week of year, but I also need the start and the end of that week, so I must think about this and I found a solution, here I capture some code from my project to know the start date and end date of that week of year