Adding limit operator and sql rules