query for thumb views