Internet Brands interview question

Longest Sum Subsequence. SQL Queries.