1 Replies - 545 Views - Last Post: 18 April 2017 - 11:05 PM Rate Topic: -----

#1 Lilith_Aries  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 70
  • Joined: 06-September 15

Hopeing for help with one more

Posted 18 April 2017 - 07:05 PM

I got all the other ones done on my own but this one is stumping me because I am getting no errors its just telling me it doesn't work. There is no huge error. but I can not figure out how to do the "Top percent" in workbench. so the database I am working with is the "world" preloaded database in Workbench the question is.

Find out official language of the top 10 GNP country, and sort the result by GNP

Here is what I have. I have ran it several times changing different things but it just wont run.
SELECT countrylanguage.CountryCode, countrylanguage.Language,country.code, country.name, country.GNP, Top(10)Percent
from countrylanguage
join country
on countrylanguage.CountryCode=country.code 
order by GNP




Is This A Good Question/Topic? 0
  • +

Replies To: Hopeing for help with one more

#2 andrewsw  Icon User is online

  • the case is sol-ved
  • member icon

Reputation: 6376
  • View blog
  • Posts: 25,763
  • Joined: 12-December 12

Re: Hopeing for help with one more

Posted 18 April 2017 - 11:05 PM

Use a meaningful title for your topic.

Which dialect of SQL are you working with? The use of the term Workbench suggests MySQL, but the use of TOP suggests MS SQL Server.

If it is SQL Server then post a simple example of the use of TOP and compare it to yours.



Remember, we aren't sitting with you; the only information we have is what you put in your post.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1