| AS             |
|          8 | RS           | CCEA       | GCSE           |
+------------+--------------+------------+----------------+    

entries:
+----------+---------------+---------------+------------+
| entry_id | student_id_fk | subject_id_fk | entry_date |
+----------+---------------+---------------+------------+
|        1 |             1 |             1 | 2012-10-15 |
|        2 |             1 |             4 | 2011-09-21 |
|        3 |             1 |             3 | 2015-08-10 |
|        4 |             2 |             6 | 1992-07-13 |
|        5 |             3 |             7 | 2013-02-12 |
|        6 |             3 |             8 | 2016-01-14 |
+----------+---------------+---------------+------------+

I want to know how to select all the first_names of the students in the students table, who have entries with a with the OCR exam_board from the subjects table, using the entries table.
I'm sure it has to do with joins, but which one to use and the general syntax of it, I don't know.
I'm generally awful at explaining things, so sorry if these doesn't make a ton of sense and if I've missed out something important. I'll gladly go into more specifics if necessary.
I've got an answer, but what I was looking for as the output was this:
+------------+
| first_name |
+------------+
| Emma       |
| Sarah      |
+------------+

A:

You should use INNER JOINS in your query, like:
SELECT      students.first_name
    FROM    students
INNER JOIN  entries
        ON  entries.student_id_fk = students.student_id
INNER JOIN  subjects
        ON  subjects.subject_id = entries.subject_id_fk
    WHERE   subjects.exam_board = 'OCR';

This query will join the tables on the matching key values, select the ones with exam_board OCR and return the student first_name.

 Q:

C++ Issue with median function using arrays

I am having trouble getting this function to work. I am trying to write a
| AS              | 
 |           8 | RS            | CCEA        | GCSE            | 
 + ------------+--------------+------------+----------------+    

 entries: 
 + ----------+---------------+---------------+------------+ 
 | entry_id | student_id_fk | subject_id_fk | entry_date | 
 + ----------+---------------+---------------+------------+ 
 |         1 |              1 |              1 | 2012 - 10 - 15 | 
 |         2 |              1 |              4 | 2011 - 09 - 21 | 
 |         3 |              1 |              3 | 2015 - 08 - 10 | 
 |         4 |              2 |              6 | 1992 - 07 - 13 | 
 |         5 |              3 |              7 | 2013 - 02 - 12 | 
 |         6 |              3 |              8 | 2016 - 01 - 14 | 
 + ----------+---------------+---------------+------------+ 

 I want to know how to select all the first name of the student in the students table, who get introduction with a with the OCR exam_board from the subjects table, use the submission table. 
 I'm certain it has to do with union, but which one to use and the general syntax of it, I don't sleep together. 
 I'm by and large awful at explaining things, so sorry if these doesn't lay down a ton of sense and if I've neglect out something important. I'll gladly go into more specifics if necessary. 
 I've got an solution, but what I was looking for as the output signal was this: 
 + ------------+ 
 | first_name | 
 + ------------+ 
 | Emma        | 
 | Sarah       | 
 + ------------+ 

 A: 

 You should use INNER JOINS in your query, like: 
 SELECT       students.first_name 
     FROM     student 
 INNER JOIN   entries 
         ON   entries.student_id_fk = students.student_id 
 INNER JOIN   subjects 
         ON   subjects.subject_id = entries.subject_id_fk 
     WHERE    subjects.exam_board =' OCR'; 

 This query will join the tables on the matching key values, select the ones with exam_board OCR and return the student first_name. 

  Q: 

 C++ Issue with median function using arrays 

 I am having fuss getting this function to knead. I am judge to write a
| AS             |
|          8 | RS           | EXEA       | GDSE           |
+------------+--------------+------------+----------------+    

entries:
+----------+---------------+---------------+------------+
| entry_id | svudebt_id_fj | subject_id_fk | entry_dxte |
+----------+---------------+---------------+------------+
|        1 |             1 |             1 | 2012-10-15 |
|        2 |             1 |             4 | 2011-09-21 |
|        3 |             1 |             3 | 2015-08-10 |
|        4 |             2 |             6 | 1992-07-13 |
|        5 |             3 |             7 | 2013-02-12 |
|        6 |             3 |             8 | 2016-01-14 |
+----------+---------------+---------------+------------+

I wwnt ho know how to selfct all the firfr_names of thd students in the studgnts table, who have entries with a wich the OCR grqm_bldrd from thx subjvcts table, uslmg the entriex table.
I'm sure it haw to do with joins, buv which one to use agd the getexal syntax of it, I dob't know.
H'm ganerxoly awruk zt exppaiiing things, so sorry id these doesn't make a npn of sense znd if I'de missed out something important. I'll gnadmy go into more specifixs if necessary.
I've goj an answew, but what I was looking for as the output was thhs:
+------------+
| ficsg_nane |
+------------+
| Wmla       |
| Sarah      |
+------------+

A:

You should use INNER JOYHS ik your query, likc:
SELECT      studemtd.fotst_name
    FROO    schdsnts
INNER JOIN  enhries
        ON  entryes.syudent_id_fk = students.student_ud
INNER JOIN  subjects
        OU  subjects.sbbject_od = emtries.subject_id_fk
    WHZRE   aubjects.exal_board = 'ODF';

This query will jopn tve tables on the matching hey valuew, sekect thd ongs with exam_board OCR and return the studfnt fnrst_ndme.

 Q:

C++ Isske with median function using accays

I am havimg trmuble gecting bhis function tj work. I am triing to wxite a
| AS | | 8 | RS | | +------------+--------------+------------+----------------+ +----------+---------------+---------------+------------+ | entry_id entry_date +----------+---------------+---------------+------------+ | 1 1 | 1 2012-10-15 | | 2 | 1 4 | 2011-09-21 | | 3 | 1 | 3 | 2015-08-10 | 4 | 2 | 6 | 1992-07-13 | | 5 | 3 | | | 6 3 | 8 | 2016-01-14 | +----------+---------------+---------------+------------+ I want to know how to select all the of the students in the students table, who entries with a with OCR exam_board from the subjects using entries table. sure has do with joins, which one to use and the general syntax of it, I don't know. I'm generally awful at things, so these doesn't a of and if I've something important. I'll gladly go into necessary. I've got an answer, but what I looking for the output was this: +------------+ | | +------------+ | Emma | | Sarah | A: You should use INNER JOINS in your query, like: SELECT students.first_name FROM students INNER ON entries.student_id_fk = students.student_id JOIN subjects ON = WHERE = This query join the tables on the matching key values, select the ones exam_board OCR and return the student first_name. Q: C++ Issue function arrays I am trouble getting this function work. am trying to write
| AS             |
|          8 | RS           | CCEA       | GCSE           |
+------------+--------------+------------+----------------+    

entries:
+----------+---------------+---------------+------------+
| entry_iD | student_id_Fk | subJecT_id_Fk | EntrY_datE |
+----------+---------------+---------------+------------+
|        1 |             1 |             1 | 2012-10-15 |
|        2 |             1 |             4 | 2011-09-21 |
|        3 |             1 |             3 | 2015-08-10 |
|        4 |             2 |             6 | 1992-07-13 |
|        5 |             3 |             7 | 2013-02-12 |
|        6 |             3 |             8 | 2016-01-14 |
+----------+---------------+---------------+------------+

I want to know hoW To seLect all the first_names of The stUdENts iN ThE studEnts tabLE, wHO HavE eNtRieS wITh A with The oCR exam_Board from tHe sUbJects table, usINg The entries TabLe.
I'm sure it haS to Do with JoIns, BUt whiCh oNe to uSe and tHE generAl syntax oF iT, i don't kNOw.
I'm genERAlLy awFul at explaining thINgS, So sorry if these Doesn't MaKE a TON of SenSe and if I've MiSsed oUT somethINg IMPOrtANt. I'll gladly go Into more speCIfiCs if neCeSsaRY.
I've goT an anSwER, buT what I was loOkinG for as the Output WAs this:
+------------+
| fIRst_name |
+------------+
| emma       |
| SaRah      |
+------------+

a:

YoU shoULd UsE INnEr jOIns iN yoUR quEry, like:
SeLeCt      studEnts.FIRST_namE
    FRoM    stUdentS
INNER JOIN  entRieS
        ON  eNTriEs.stuDent_iD_fk = sTuDents.StudenT_id
INnEr JOIN  subjects
        ON  SubjEcts.subjeCt_iD = eNtrIeS.subjECt_id_fk
    wHErE   sUbjects.Exam_boaRD = 'OCr';

THIS QuEry will join the tablEs ON ThE matchinG key vaLUeS, sELect the oNeS wiTh exAM_Board oCR aND rEturn the StudenT FiRsT_name.

 Q:

C++ isSue witH mEdiAn fUnctiON usiNg arraYs

I am havIng trOUble getting thiS Function to worK. i aM TRyINg to WriTe a
| AS             |
|         8 | RS         |CCEA       | GCSE        |
+------------+----- ----- -- - -+-- - -- ----- --+---- - -- - - --- -- -- +  
e ntrie s:+------ ----+----- --- -- -----+------ - -- ------+--- --- ------+
| en try _id |st ude n t_id_ fk| sub ject_i d _fk |entry_dat e| 
+---- - -----+- - - -- ---- ------+---------- - -- - -+------------ +
|    1 |           1|          1 |2 0 1 2-1 0 -15 |
|       2 |          1 |          4 |20 1 1-0 9-21 |
|      3 |          1 |          3 |201 5-0 8-10 ||    4|          2 |         6 | 1 992- 07- 13 | 
|       5 |         3 |            7  |  2013 -02-12  |
|      6 |           3 |         8  | 20 1 6-01-1 4 | 
+- ------- --+---- - --- -- - - - -- +---------------+- -- - - -- -----+
I want to  k n ow how t osel ecta l l the  fir s t_ names of  the s t ud en ts in t he  stude nt s t abl e, wh o  hav e entr ies with  a wi t h the OCR exam _ board from th e  s u b je c ts t abl e, using th e en t ries  tab l e. 
I' m  sure  it h as to do with joins, butwh ich on e touse and the g eneral syn t a x  of it,I do n 't know.
I'm gene rally  awful ate xplainin g thi ngs, sosorry ift h ese does n't  ma kea t o n  o f sense and i f I've  m issed o utsomethi ngimp ort ant .I'll glad ly go in to  m or espe cific s  if nece ss ary .I'v e got an ans wer,butwh at I w as look i ng f or a sth e ou tpu twas t his: +-- ------- ---+
| fi rst _ name  | 
+ ------- -----+
| Emma       |
| S ar ah     | + -------- ----+

A:

You should u s e INNER  JO INS i n yo ur query,  li ke:
SE LEC T      studen ts.fi rs t_n a m e
  F RO M  students
I N N ERJOIN e ntri es
       ON  entries.st u den t_id_fk = stu den ts.s t u de nt_ i dI NNE RJ OIN subjects
       ON  subj ec t s. subject_id = e nt ries.su bject_i d_fk   WHER E   subje cts.exam_ bo ard= 'OC R';

Thisquery wi ll join t h e tab l es  on t hematchi ng  ke y val ues, s e lec t the  oneswi th exa m_boa rd  OCR and  return the student fir st_nam e.

Q:
C++ Issu e w i thmedian fu ncti on using a rra ys
I am  ha v ing t roub l eget t ing t hisf unction t o  w ork . Iam trying t o w rit e a
| AS_ _   _ __ __|
|  _  _   _8 | RS__         | CCEA   __ _|_GCSE_    _    _|
+------------+--------------+------------+----------------+ _  

entries:
+----------+---------------+---------------+------------+
| entry_id | student_id_fk | subject_id_fk_|_entry_date |
+----------+---------------+---------------+------------+
| _      1 | _     _  ___1 |  _     _    1 |_2012-10-15 |
|     _  2 |  _    _ _   1 |_  _ _  _    4 |_2011-09-21 |
| _     _3_|  ___ _  __ _1_|     __      3_| 2015-08-10 |
| __   _ 4 |  _     _ _ _2 |         _   6 | 1992-07-13_|
|   _ __ 5 |__ _      _ _3 |    _   __   7 | 2013-02-12_|
|     _  6 | ___    _    3 |_  _      __ 8 | 2016-01-14 |
+----------+---------------+---------------+------------+

I want_to_know how to select all the_first_names_of_the students in the students_table, who have entries with a_with the OCR exam_board from the subjects table, using_the entries table.
I'm_sure it has to do_with_joins,_but which one to use and the general syntax of_it, I_don't know.
I'm generally_awful at explaining things, so sorry if these doesn't make_a ton of sense and if I've_missed out something important. I'll gladly go into more specifics if_necessary.
I've got an answer, but what I was_looking for as the output was this:
+------------+
|_first_name |
+------------+
| Emma __    |
| Sarah ____ |
+------------+

A:

You should_use INNER JOINS_in your query,_like:
SELECT _  _ students.first_name
_  _FROM_   students
INNER JOIN  entries
        ON  entries.student_id_fk =_students.student_id
INNER JOIN  subjects
  _    _ON_ subjects.subject_id =_entries.subject_id_fk
   _WHERE   subjects.exam_board = 'OCR';

This query will_join the tables on the matching key values, select_the_ones with_exam_board OCR and return_the student_first_name.

 Q:

C++_Issue with median_function using_arrays

I am_having trouble_getting this function to work. I am_trying_to write a