Some things in lecture and in my lab assignment were not explained very well. I am having trouble displaying the correct information. Here is the database info, simply a reference for you to help me. The database tables info This is the query that I am trying to execute The postgresql php select statement
This results in this SQl error being throwned
Connected to database! Query failed: ERROR: column "city.name" must appear in the GROUP BY clause or be used in an aggregate function LINE 3: city.name ^
Now if I do add city.name into the GROUP BY clause, it returns 4096 rows! I dont want that to happen, the results have to be group by country name which is 232 rows. I simply want to display the country name, city name, and the city with the highest population in that country. City name is throwing me off, Im guessing there is a more complicated more syntax heavy solution. Thanks for any help you can provide. -Tom Reese