close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

One Button Works Well while the Other One Doesn't

Thread began 10/19/2015 7:11 am by salaroche | Last modified 10/22/2015 3:02 pm by salaroche | 930 views | 12 replies

salaroche

Ray:

Thanks. Unfortunately, right now I don't have those pages uploaded to the Web. I'll upload them later and maybe we can work on this tomorrow. In the meantime, can you tell why the Min(date) and Max(date) functions work well in case No.1 but not in case No.2?

Case No.1:

SELECT oxadmain.name , oxadmain.year , oxadmain.photoID , oxadmain.thumbs , stuattend.ID , stuattend.studid , min(stuattend.date) as fromdate , max(stuattend.date) as todate , stuattend.teacher, stuattend.subject , stuattend.attendance, Count(*) AS RowCount, SUM(if(stuattend.attendance = 'Absent', 1, 0)) AS absents
FROM stuattend INNER JOIN oxadmain ON stuattend.studid=oxadmain.stuid
GROUP BY studid
ORDER BY name ASC

Case No.2:

SELECT oxadmain.name , oxadmain.year , oxadmain.photoID , oxadmain.thumbs , perfgroups1to4.ID , perfgroups1to4.studid , perfgroups1to4.subject , perfgroups1to4.teacher , perfgroups1to4.cw , perfgroups1to4.con , perfgroups1to4.att , perfgroups1to4.attPunct , perfgroups1to4.part , perfgroups1to4.disc , perfgroups1to4.proj , perfgroups1to4.exAct , MIN(perfgroups1to4.date) AS fromDate , MAX(perfgroups1to4.date) AS toDate , SUM(cw) AS cwSum, SUM(con) AS conSum, SUM(att) AS attSum, SUM(attPunct) AS attPunctSum, SUM(part) AS partSum, SUM(disc) AS discSum, SUM(proj) AS projSum, SUM(exAct) AS exActSum, ROUND((AVG(cw)+AVG(con)+AVG(att)+AVG(attPunct)+AVG(part)+AVG(disc)+AVG(proj)+AVG(exAct))/5, 1) AS Avg, cw+con+att+attPunct+part AS ClPerfTot, SUM(disc) AS discTot, cw+con+att+attPunct+part+disc AS Total
FROM perfgroups1to4 INNER JOIN oxadmain ON perfgroups1to4.studid=oxadmain.stuid
GROUP BY studid
ORDER BY name ASC

In case No.2 both Min/Max functions return the date the individual records were entered.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...