If Sophie was given 20 oranges every day for thirty days, she had taken 20*30 = <<20*30=600>>600 oranges to school.
Similarly, in the thirty days, Hannah had taken 40*30 = <<40*30=1200>>1200 grapes to school.
In the thirty days, Hannah and Sophie took 1200+600 = <<1200+600=1800>>1800 fruits to school.
#### 1800