SQL query not working need help

i am trying to write a SQL query to pull all students that have graduated May 2012 to the present date

also i cannot figure out the query to pull last semester date for each student

if you have a template where i can fill in the blanks that would be awesome or some links to where i can get help

we are using SQL 2014

any and all help will be greatly appreciated
amoosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vitor MontalvãoMSSQL Senior EngineerCommented:
You didn't give any example or sample data so this will be more like a general answer.
pull all students that have graduated May 2012 to the present date
SELECT *
FROM Students
WHERE GraduateDate>='2012-05-01'

Open in new window

pull last semester date for each student
How are you storing the semester?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverCommented:
Try
SELECT * FROM students WHERE graduateDate='2015-05-15'

Open in new window


If you want a template, you can also consider to program in Excel Macro and to link to Sql server, from Excel file.

Read
https://support.office.com/en-nz/article/Connect-a-SQL-Server-database-to-your-workbook-22c39d8d-5b60-4d7e-9d4b-ce6680d43bad
0
Scott PletcherSenior DBACommented:
SELECT e.student_id, s.name AS student_name, MAX(e.semester_date) AS last_semester_date
FROM enrollment e
INNER JOIN (
    SELECT student_id, name
    FROM students
    WHERE
        graduation_date >= '20120501'
) AS s ON
    s.student_id = e.student_id
0
amoosAuthor Commented:
thank you guys.  great help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.