Mysql
 sql >> Database >  >> RDS >> Mysql

ERRORE 1349 (HY000):SELECT di View contiene una sottoquery nella clausola FROM

Che ne dici di questo invece?

create view fg_voted as (

  SELECT f1.foto, 
         count(f1.vote) stars,
         f1.vote, 
         f1.voted 
  FROM   fg_foto_bewertung f1 
  WHERE  f1.vote >= 3 
  GROUP BY f1.foto, 
           f1.vote, 
           f1.voted 
  HAVING count(f1.vote) > 3
 );