sql select max value from multiple rows
SELECT name,price FROM fake_apps
WHERE price = (SELECT max(price) FROM fake_apps);
sql select max value from multiple rows
SELECT name,price FROM fake_apps
WHERE price = (SELECT max(price) FROM fake_apps);
sql max of two values
-- For SQL Server >= 2008
SELECT [Other Fields],
(SELECT Max(v)
FROM (VALUES (date1), (date2), (date3),...) AS value(v)) as [MaxDate]
FROM [YourTableName]
/* Note (from comments): From value(v), "value" is the alias for the
* virtual table and "v" is the name of the virtual column of the date values.
*/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us