Ask for a SQL statement

Name Class Score
Zhang San Chinese 81
Zhang San Mathematics 75
Li Si Chinese 76
Li Si Mathematics 90
Wang Wu Chinese 81
Wang Wu Mathematics 100
Wang Wu English 90

  1. use a SQL sentence to query the Name of the students with the lowest Chinese scores except Li Si
select Name from (select Name,min(Score) from table where Name<>"" and Score = "" tmp
The result of

query is only Zhang San, but Zhang San and Wang Wu are juxtaposed in the table. How to modify

Mar.11,2021

SELECT name FROM scores WHERE score = (SELECT MIN (score) FROM scores WHERE name < >'Li Si 'and class =' Chinese') and name < >'Li Si 'and class =' Chinese'

it feels a little long, but I can't think of a better way.


SELECT
  t.name
FROM
  table as t
WHERE
  t.name!='' and t.score=
                         (SELECT
                            min(t.score)
                          FROM
                            table as t
                          WHERE
                            t.subject='')
Menu