Anonymous Interview Question

they ask pattern program and swap program and one sql subquery prograam