Finding Minimum Math Score With SPL's Minp Function
Get min value record: Use minp() to find ID(s) of students with lowest math score in class 1. @a option returns all records with min value.
Get the record containing the minimum value of a specified field, such as finding ID of the student(s) whose math score (s) is/are the lowest in class one based on the Scores table. We use minp() function to locate the record holding the minimum value of a specified field and then get the student ID. SPL script: A1 Connect to the database; A2 Get records of class one where subject is math; A3 minp function gets the record having the minimum score; A4 Get student ID from A3’s record. Sometimes there is more than one record having the minimum value. To return all those records, use @a option i...