Move share data query to SqlAction.