add sql restriction