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='')
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be6b9b-30566.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be6b9b-30566.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?