I need to write a SQL statement to select and sort data ordered by priority of value and name. Please see the criteria below.
Database schema :
nam