Essentially the FROM part calculates how many of each item has been sold today and then uses this amount to reduce how many are currently in stock (the UPDATE and SET parts).
I see what it's doing but I don't really see what the benefit is. Maybe a comparison to what previously had to be done would help me? Would you have to make the 'daily' table in a separate step and then UPDATE using that?
Previously you would have to SELECT and then UPDATE in separate queries, meaning that the data is round tripping to your application server and back again.
Edit: Or use subqueries apparently.
This is sqlite, you typically don't have a server.