Jump to content

Omabala

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Omabala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Could someone please tell me how to retrieve a table so that one column simply displays something and another column counts something for example: SELECT COUNT(u_id), SELECT countryName FROM _AEsurvey_rego WHERE countryName LIKE ('China') GROUP BY countryName; but I get this error message: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT countryName  FROM _AEsurvey_rego  WHERE countryName LIKE ( 'China' )  GRO' at line 1 Cheers.
  2. Im trying to retrieve information from 3 different tables and end up with a table with 5 columns: 1st column displays vis_type 2nd column displays countryName 3rd column displays the total number of u_id 4th column displays average score of aesth_rank and 5th column displays average score of x_pos MySQL keeps telling me something is wrong with my 2nd line...it seems to not like how i type SELECT COUNT (...) Can any1 tell me all the errors in my query...I'm just a beginner SELECT a.vis_type, c.countryName AND SELECT COUNT (‘a.u_id’) AND SELECT AVG(‘a.aesth_rank’) AND SELECT AVG(‘b.x_pos’) FROM _AEsurvey_meta_info a, _AEsurvey_aesth_rank b, _AEsurvey_rego c WHERE (a.vis_type = '1' AND c.countryName LIKE ('China')) OR (a.vis_type=’2’ AND c.countryName LIKE (‘China’)) AND a.u_id = b.u_id AND b.u_id = c.u_id GROUP BY a.vis_type; Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.