Complete the code to select all rows from the table 'employees'.
SELECT * FROM [1];The table name to select from is 'employees'.
Complete the code to begin a transaction in PostgreSQL.
[1] TRANSACTION;To start a transaction, use the command BEGIN TRANSACTION.
Fix the error in the SQL to see the current transaction's snapshot.
SELECT txid_snapshot_[1]();The correct function to get the current transaction snapshot is txid_snapshot_current().
Fill both blanks to write a query that shows all visible rows for the current transaction using MVCC.
SELECT * FROM employees WHERE xmin [1] [2];
In MVCC, rows with xmin less than the current transaction ID (txid_current()) are visible.
Fill all three blanks to write a query that deletes rows visible to the current transaction and committed before it.
DELETE FROM employees WHERE ctid IN (SELECT ctid FROM employees WHERE xmin [1] [2] AND xmax = [3]);
This query deletes rows where xmin is less than the current transaction ID and xmax is 0 (not deleted).