List:General Discussion« Previous MessageNext Message »
From:tech user Date:April 1 2008 4:50am
Subject:help with a sql statement
View as plain text  
hello,

I try to execute this sql in mysql shell,but got error as:

mysql> select *  from (select uin,count(*) as dd from active_users where
date >= date_add(curdate(),interval -30 day)  group by uin) where dd >=3;

ERROR 1248 (42000): Every derived table must have its own alias

But I can execute the sql statement of "select uin,count(*) as dd from
active_users where date >= date_add(curdate(),interval -30 day)  group by
uin" successfully.

How to fixup it? thanks!


      Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/y7mail



Thread
help with a sql statementtech user1 Apr
  • Re: help with a sql statementpaul rivers1 Apr
    • Re: help with a sql statementtech user1 Apr
      • Re: help with a sql statementpaul rivers1 Apr
        • ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)Vidal Garza3 Apr
          • Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)Krishna Chandra Prajapati3 Apr
            • Re: ERROR 2002 (HY000): Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (61)Vidal Garza3 Apr
              • Re: ERROR 2002 (HY000): Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (61)Joerg Bruehe3 Apr
                • Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)Moon's Father7 Apr
          • Re: ERROR 2002 (HY000): Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (61)Joerg Bruehe3 Apr