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 878729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:48:41+00:00 2026-05-15T11:48:41+00:00

How to get last 3 months records from the table. SELECT * from table

  • 0

How to get last 3 months records from the table.

SELECT * 
from table 
where month > CURRENT_DATE-120 
  and month < CURRENT_DATE 
order by month;

I have used the above query is it correct? shall I use this for get last 3 month record from the table.

  • 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-15T11:48:42+00:00Added an answer on May 15, 2026 at 11:48 am

    You can use built-in INTERVAL instruction

    Check how this works:

    SELECT CURRENT_DATE - INTERVAL '3 months'
    

    and you can rewrite your SQL to:

    SELECT * from table where date >  CURRENT_DATE - INTERVAL '3 months'
    

    (not checked but this should give you an idea how to use INTERVAL instruction)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to fetch records based on two dates from sql server... Select
Essentially, I have a query that is responsible for fetching all records (with specific
I am trying to get the lines count(entered) for Today, Month to date, year
I'm trying to reinstall a site I haven't used in several months and am
I hope someone could help me on this. I want to add a month
maybe anyone can help me out with my SELECT statement on MS SQL Server.
I have the following db tables (which is simplified to illustrate the problem) CampaignTx
A friend asked me for help on building a query that would show how
I am having difficulty updating records within a database based on the most recent
I have a stored Procedure that works fine joining 2 tables together. I needed

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.