0

How select records from related table not older then 3 months

Hello!

Actually the subject says it all.

I searched for a similiar question here, but did not find...

 

In table Treatments i need to have an average cost of a product i bought in a period (lets say 3 months).
Bought product prices are in table Orders.

More or less i understand that i have to SELECT records whose date is not older than 3 months from TODAY().
The only idea i came to, is i need a timestamp of three months to subtract from today's timestamp.

If  there is a more "human" way to do that, please share!!  )) 

Thanks in advance!

Agassi

8 replies

null

Content aside

  • 3 yrs agoLast active
  • 8Replies
  • 1084Views