what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.
return manufacturers ;return #1 that  opened before 1990 ;return factories of #2 ;return the  number of  #3 for each #2 ;return the  average of #4 ;return shops of #2 ;return the  number of  #6 for each #2 ;return the  maximum of #7 ;return #5 ,  #8
['select', 'filter', 'project', 'group', 'aggregate', 'project', 'group', 'aggregate', 'union']