Hi I have a master table Company info where information like revenue, profit, expenses etc are captured. Now i want to retrieve companies who has made profit every year since last 5 years. Issue is some company have latest data of 2017 and some have latest dat until 2016. How to query this...Appreciate your help

   select * from company where has_made_profit_every_year_for_the_last_five_years = 1;

Hope this helps.

commented: I understand this line of thinking. +11
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.