Don't know about all the others but do know that Philip is only a great-grandchild of Christian IX of Denmark - Christian - William (George I of the Hellenes) - Andrew - Philip.
The Queen is definitely a great-great-grandchild - Christian - Alexandra - George V - George VI - Elizabeth.
Yes, that is correct.
The other lines
from Christian IX are as follows:
Christian IX - Frederick VIII- Christian X- Frederick IX - Margrethe II
Christian IX - Frederick VIII- Ingeborg of Denmark- Astrid of Sweden -Albert II of Belgium
Queen Sofia of Spain on the other hand descends from Christian IX on two lines:
Christian IX- George I of Greece - Constantine I of Greece - Paul of Greece- Queen Sofia
Christian IX - Princess Thyra of Denmark- Ernst August, Duke of Brunswick-Princess Frederika of Hanover-Queen Sofia
Finally, King Harald V is also a great-great-grandson of Christian IX in two lines:
Christian IX- Princess Alexandra of Denmark- Maud of Wales - Olav V of Norway- Harald V of Norway
Christian IX- Frederick VIII of Denmark- Haakon VII of Norway - Olav V of Norway -Harald V of Norway.
The lines from
Queen Victoria on the other hand are:
Queen Victoria- Princess Alice- Princess Victoria of Hesse and by the Rhine- Princess Alice of Battenberg-Philip, Duke of Edinburgh
Queen Victoria - Edward VII - George V- George VI- Elizabeth II
Queen Victoria- Edward VII- Maud of Wales-Olav V of Norway- Harald V of Norway
Queen Victoria - Prince Arthur, Duke of Connaught- Princess Margareth of Connaught - Ingrid of Sweden-Margrethe II of Denmark
Queen Victoria- The Princess Beatrice - Victoria Eugenie of Battenberg- Infante Juan, Count of Barcelona- Juan Carlos of Spain.
King Carl XVI Gustaf in turn is a great-great-grandson of Queen Victoria in two lines, as shown below.
Queen Victoria - Prince Arthur, Duke of Connaught- Princess Margareth of Connaught - Prince Gustav Adolf, Duke of Västerbotten- Carl XVI Gustaf of Sweden
Queen Victoria- Prince Leoplod, Duke of Albany- Charles Edward, Duke of Saxe-Coburg and Gotha- Princess Sybilla of Saxe-Coburg and Gotha- Carl XVI Gustaf of Sweden
Similarly, Queen Sofia is a great-great-granddaughter of Victoria in one line and a great- great- great-granddaughter in another.
Queen Victoria-Victoria, Princess Royal- Sophia of Greece- Paul I of Greece- Sofia of Spain.
Queen Victoria- Victoria, Princess Royal- Wilheim II, German Emperor-Princess Viktoria Luise of Prussia-Frederika of Hanover-Sofia of Spain
King Willem-Alexander of the Netherlands is distantly related to all of the above , as I claimed before, by their common descent from
George II of the United Kingdom
George II - Anne, Princess Royal- Willem V, Prince of Orange- Willem I of the Netherlands-Willem II of the Netherlands-Willem III of the Netherlands- Wilhemina-Juliana-Beatrix-Willem Alexander.
George II - Frederick, Prince of Wales- George III of the United Kingdom-Prince Edward, Duke of Kent-Queen Victoria-{aforementioned royal lines}.
George II- Princess Louise of Great Britain- Princess Louise of Denmark and Norway-Louise Caroline, Duchess of Schleswig-Holstein-Sonderburg-Glücksburg- Christian IX - {aforementioned royal lines}.