JOIN fakulti ON aduan_fb.fakultiid=fakulti.fakultiid INNER JOIN (SELECT distinct COUNT(aduan_fb.fakultiid) FROM aduan_fb group by fakultiid))aduan_fb
ok firstly this query should find the name of 'nama_fakulti' by distinct and also count the row of 'fakultiid' but right now im stuck that it shows in mysql as below
#1248 - Every derived table must have its own alias
is there any suggestion?
Please next time format your code by wrapping it with triple backticks and please indent so i can help you faster and not wasting my time with this. The error: #1248 - Every derived table must have its own alias It means: Every sub query you make must have it's alias which means the keywork "AS blabla" The correct query must be: SELECT * FROM ( SELECT Distinct aduan_fb.fakultiid, fakulti.nama_fakulti from aduan_fb INNER JOIN fakulti ON aduan_fb.fakultiid=fakulti.fakultiid INNER JOIN ( SELECT distinct COUNT(aduan_fb.fakultiid) FROM aduan_fb group by fakultiid) AS SOMETHING ) AS aduan_fb
Обсуждают сегодня