Select Financial year

How to write a select query for financial year? The financial is from 1st July to 30th June each year. Here’s the pseudo code (dd-mm-yyyy):

If extract(month from current_date) < 7 then

select date between (‘01-07-date_part(‘year’, current_date)’-1) and (‘30-06-date_part(‘year’, current_date’)

else

select date between (‘01-07-date_part(‘year’, current_date)’) and (‘30-06-date_part(‘year’, current_date’)

End if;

Appreciate any help.

what is it that you’re trying to return with the query? a single date?