hello there,
i m attaching the image with data records. Actually , i need the result like
CLICK HERE
total correct answer and total incorrect answer [your_result)]according date-wise.
like current date,
with last two previous date,
with weekly records
with monthly records ....
hope you can understand my requirement
and following qurey which i was tryin also have a look it at but still not achieved what i need to achieved.
SELECT distinct c.date, c.correct_answer,i.incorrect_answer, ABS(c.correct_answer - i.incorrect_answer) AS result
FROM (SELECT distinct CONVERT(varchar(12), date, 110) AS date, COUNT(your_result) AS correct_answer
FROM tb_mathamatics
WHERE (topic = 'addition_1') AND (your_result = 'correct')
GROUP BY CONVERT(varchar(12), date, 110)
) AS c CROSS JOIN
(SELECT distinct CONVERT(varchar(12), date, 110) AS date, COUNT(your_result) AS incorrect_answer
FROM tb_mathamatics AS tb_mathamatics_1
WHERE (topic = 'addition_1') AND (your_result = 'incorrect')
GROUP BY CONVERT(varchar(12), date, 110)
) AS i
Help in Sql Query
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Dorababu MekaRank #457 · 5.5K reputationPosted Aug 9, 2011, 3:52 AM EDT