Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
return suppliers ;return products of #1 ;return amounts of #2 purchased ;return the  average of #3 for each #1 ;return #1 where #4 is  above 50000 ;return #1 where #4 is  below 30000 ;return #5 ,  #6 ;return the  ids of #7
['select', 'project', 'project', 'group', 'comparative', 'comparative', 'union', 'project']