CREATE OR REPLACE PROCEDURE ML_SONG_SUMMARY_INFO_DELETE_OLD_SNAPSHOT_PROC(p_date VARCHAR, p_hour VARCHAR)
    RETURNS STRING
    LANGUAGE SQL
    AS
    $$
    DELETE FROM SUNO_PROD.PROD.ML_SONG_SUMMARY_INFO_V1
    WHERE 1=1
        AND (p_date < :p_date)
        OR (p_date = :p_date AND p_hour <= :p_hour);
    $$;
