Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3233094
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:14:15+00:00 2026-05-17T17:14:15+00:00

Is there a way in Oracle that can pull the FY? I used the

  • 0

Is there a way in Oracle that can pull the FY? I used the script below to pull just two FY. Mytable date range is from FY1998 to FY2009.

 SELECT 'FY2008' as FY, 
         Site, 
         COUNT(*) 
    FROM mytable 
   WHERE date >='10-OCT-2007' 
     AND date <'10-OCT-2008' 
GROUP BY site

 SELECT 'FY2008' as FY, 
         Site, 
         COUNT(*) 
    FROM mytable 
   WHERE date >='10-OCT-2008' 
     AND date <'10-OCT-2009' 
GROUP BY site

Pulling two FY is OK but it’s too much repeatative when pulling more than 10 FY.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:14:15+00:00Added an answer on May 17, 2026 at 5:14 pm

    Add 83 days to your date and truncate it to whole year:

    select 'FY'||TRUNC(date + 83, 'YYYY') as FY, Site, count(*)
    from mytable
    group by 'FY'||TRUNC(date + 83, 'YYYY'), site
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can connect to a server DB (Oracle, MS
Is there a way in SQL SERVER or ORACLE that can use the case
is there any way in Oracle, to get only the dd-mm-yyyy part from an
Is there a way to restore an Oracle 11g instance from raw data files
Is there an easy way to determine in a SQL Script if the ORACLE
Is there any other way to get datetime field from oracle database in 24hour
I asked the question this way because I can imagine that there's a potentially
Is there a way that one can test if a row has been locked
I am aware that there are functions in Oracle and MsSQl that can do
Is there a way to generate an arbitrary number of rows that can be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.