how to group by following column and get the maxvalue?

  • name value zone

    CA129R2748East

    CA129R543west

    CA129R3000north

    CA129R100south

    ....

    required output:

    name value zone

    CA129R 3000 north

  • Duplicate posting. Please send all replies and responses here:

    http://www.sqlservercentral.com/Forums/Topic1195900-145-1.aspx


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • name value zone

    CA129R 2748 East

    CA129R 543 west

    CA129R 3000 north

    CA129R 100 south

    ....

    required output:

    name value zone

    CA129R 3000 north

    Answer:

    select * from TestZone where value=3000

    (or)

    select * from Testzone where value LIKE '%300%'

    hope this will help..

    let me know any queries..

    Regards

    Sriram.R

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply