sql server - SQL Customer leave before trail ends -


I need help creating a SQL query for a sports rental site, I have to know the customers who Leave your test before the end of the test

Then the query will contain only the user table and I will have to do such a question: -

  Select user from user where Date dated for less than 30 days   

The database is MS SQL 2008.

What do I still have: -

  Select from user where (date and gt; = datejoded - 30)   

But this does not work.

You should use the DATEDIFF function:

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -