SQL Function Reference

LAG
Window function. Accesses data from previous rows of the window.
MySQL
LAG(column [, offset ] [, default])
column
Column whose value is to be returned
offset
Number of lines to offset (default 1)
default
The value to return if NULL is returned after the offset
Examples
MySQL
SELECT 
    member_name, 
    status, 
    LAG(member_name) OVER(ORDER BY status) AS 'lag_1',
    LAG(member_name, 2, 'empty') OVER(ORDER BY status) AS 'lag_2' 
    FROM FamilyMembers;