Cockroach Posted May 2, 2017 Share Posted May 2, 2017 (edited) In working the "Try It Yourself" demo for the SQL MAX() command, the result does not make sense to me! Can someone help explain how the demonstrator came up with that result? Edited May 2, 2017 by Cockroach Link to comment Share on other sites More sharing options...
justsomeguy Posted May 2, 2017 Share Posted May 2, 2017 Can you link to the page you're asking about? Link to comment Share on other sites More sharing options...
Cockroach Posted May 2, 2017 Author Share Posted May 2, 2017 MAX() Link to comment Share on other sites More sharing options...
justsomeguy Posted May 3, 2017 Share Posted May 3, 2017 That code is running in your browser, these days there is a way to create an actual database in your browser, so it's your browser that is running that code on the database that the site created. You can see the list of tables in the database on the right side of the screen in the Try It editor. It has this as the query that it's running: SELECT MAX(Price) AS HighestPrice FROM Products; And the result is 263.5. Since it is selecting from the Products table, if you click on the Products table on the right side of the screen then it will list all 77 records in that table, and if you scroll through that table you'll find that the highest price is 263.5 for the product called Côte de Blaye. Link to comment Share on other sites More sharing options...
Cockroach Posted May 4, 2017 Author Share Posted May 4, 2017 Ahhhhhh! Now I understand how this trainer works. On the previous page it only listed 5 items, top amount is 25! But there are other items in that database, you just have to know how to find them! Now, I do! Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now