In my Database I have a table called ARTICLES
. In ARTICLES
I have 2 columns.
Now I want to get the max value of NRRENDORDOK
column where the TIP
column has value 'A'.
e.g. the max number of cells A in TIP column is 8.
Any help will be appreciated.
You should take use of the MAX
function and then GOUP BY tip in order to get the max value for each tip
:
SELECT tip, MAX(nrreddordok) FROM table GROUP BY tip
If you just want values for A
then you can use following query:
SELECT MAX(nrreddordok) FROM table WHERE tip = 'A'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments