Skip to content
Advertisement

selecting from the table where the display_start date is minimum

This is what I want though can’t find the proper syntax. eg.

select * from campaign where campaign_display_start is minimum;

Advertisement

Answer

SELECT *
FROM campaign WHERE campaign_display_start = 
(
 SELECT MIN(campaign_display_start) FROM campaign
)

As per your requirement you can use below one

SELECT *
FROM campaign 
WHERE campaign_display_start =
(
  SELECT MIN(campaign_display_start) FROM campaign 
  WHERE campaign_display_start>now()
)
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement