Workaround for querying a query table

Workaround for querying a query table

Hi,

I'm trying to create an automatically-updating "dashboard" of Minnesota, U.S. election results. I'm having trouble with the layout of the data, though. It's in a "hierarchical" format and I need to get it into a "rectangular" format. I'm not sure if there's a way to achieve this using Zoho DB.

Here's what the data looks like:

Precinct....Party.......Votes
1....................D............X.....
1....................R............X.....
1.....................I. ...........X.....
2....................D............X.....
2....................R............X.....
2.....................I.. ..........X.....

And here's what I'd like it to look like:

Precinct...D....R....I....
1...............X.....X...X....
2...............X.....X...X....
2...............X.....X...X....

Normally, I would create a query table for each individual party, then query those tables to create the rectangular layout. As far as I understand, this isn't available in DB yet. I think it could also do it with several separate SELECT statements, but this doesn't appear to be available either. Does anyone have another idea for a workaround?

Thanks,
Jeff Rosenberg