sql - MySQL JOIN and COUNT failure -


i have 2 tables in mysql database.

------------------------------------------------------------------------ |student:    |name      |neptunid |signature |sex  |          | ------------------------------------------------------------------------     |signature:  |studentid |classid  |start     |end  |startsig  |endsig ------------------------------------------------------------------------ 

i have search given classid , following information:

  • name of student (studentid=neptunid)

  • signature table student

  • startsig field necessary

  • sum of students per sex

i have tried following query, don't know, how define, sex field should counted (male/female).

select st.name,st.neptunid,st.signature,si.startsig student st join signature si on st.neptunid=si.studentid si.start<'$today' , si.end>'$today' 


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -