Group B is going to have a vitamin D deficiency compared to group A. Group A is also much more likely to survive Covid. However, this wouldn't give you any evidence that vitamin D is the cause of better survival rates. You should assume that it might just be an indicator of better health over all unless you can find some way to control for all the other health factors.
My guess is that it helps more than hurts to supplement vitamin D if you are deficient or insufficient. I'd also guess that it is no miracle cure like Borsche and Glauner seem to want people to think.
The results are compelling, and I suppose it would not hurt to take a prophylaxis of vitamin D (5,000 units per the article?) as compared to a prophylaxis of something else, such as hydroxychloroquine (or Lysol!)
"...an extensive discussion of the differences between the death rates of New York City and Lagos, Nigeria, which both received infected travelers around the same time. NYC's high rate has been linked to population density, poverty, overcrowding, and ethnicity. Lagos is a crowded urban center of about 22 million people with 30 families often in a single building sharing the same bathroom, and none of the factors mentioned favor reduced death rates in Lagos. Lagos further has lower quality of medical care. Yet NYC had a death rate 600 times higher. The younger population can only account for a small part of this difference. Mitchell concludes that there is a crossover prophylactic effect of antimalarial agents against COVID-19."
I will grant that prophylaxis use of HCQ is much more interesting than its use in treatment, but I don't think this paper is very strong.
I am a bit stunned that people are still going on about HCQ after all this time and the many trials. I feel this comment by a virologist is the key to understanding why it got so hyped and is not working:
https://www.sciencedirect.com/science/article/pii/S016635422... (May 2020)
"Highlights
• In vitro data suggest that chloroquine inhibits SARS Cov-2 replication. • In past research, chloroquine has shown in vitro activity against many different viruses, but no benefit in animal models. • Chloroquine has been proposed several times for the treatment of acute viral diseases in humans without success. • The outcomes of some current clinical trials of chloroquine in China have been announced, without access to the data. • Peer review of the results and an independent assessment of the potential benefit for patients are essential."