Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SQL : I have 2 tables, one with current year data and othe with previous year data. Suppose current table is of 2018 and previous table is of 2017.
Fields are: Student Id, Name, Class, exam Type, subject, marks
I want to show the details of each student who got average marks less than 40 in previous year. What will be the query.
Is this the expected result?
For current year:
avg({<Year={'$(=max(Year))'}>}marks)
Last year with marks below 40:
avg({<Year={"$(=max(Year)-1)"},marks={"<40"}>}marks)
Thanks and regards,
Arthur Fong
Hi Buddy,
Thanks for your response and effort, however, I was looking for a SQL query to achieve this. I know this community is specific to Qlik, but would be helpful if you can help with the query.
Sujit, as you referenced in your reply, our forums are for Qlik products, in particular QlikView in this forum, you would be best off going to the Microsoft Communities in your case, or perhaps Stack Overflow or some other programming site, as I am doubtful you are going to get someone to write your SQL query for you here.
I did a quick Google search on SQL Query help and got quite a few hits, was not sure which one(s) may be of help, so going to let you run that yourself to see if you can find what you need, but I saw CodeAcademy as well as W3Schools hits showing up as well as quite a few others, so I believe you should be able to find what you need.
Regards,
Brett