I have the following query:

```
use datafeeds;
 select date, speed, dir from weather 
 where date >= DATE_SUB(NOW(),INTERVAL 1 DAY);

```

Which selects this data:

```
date                   speed   dir           
2014-03-23 19:33:00    100     e
2014-03-23 19:38:00    26      se
2014-03-23 19:43:01    37      e
2014-03-23 19:48:01    93      sw
2014-03-23 19:53:01    47      nne
2014-03-23 19:58:01    81      n
2014-03-23 20:03:00    28      s
2014-03-23 20:08:00    12      nw

```

I would like to modify this so that the data for each wind direction is entered into its own table. I need this to create rose diagrams.

So I would have 16 tables, like one called wind\_e with (date, speed)
In wind\_e

```
date                   speed              
2014-03-23 19:33:00    100     
2014-03-23 19:43:01    37      

```