Tech Wish List: Better SQL
Dec. 22nd, 2011 12:38 pmWishList: SQL extensions that operate on lists, returning lists. _sum(<select ... > and table-name = and data-type = "integer";_
One should be able to pass the results of that to another select statement, for instance the kind of statement I have at the top: _select sum(select column-name...) from table-name as select column-name..._ would return the sums of all integer columns, appropriately labeled. add a few constants in the outer select and you'd be ready to insert a TOTAL row in any tables whose constraints didn't prevent it.
(If Google+ has an escape character, I can't find it documented and I didn't feel like trial and error. those hyphens are underscores.)
I've been able to make most any environment I've worked in or toyed around with sing tunes like that. If you name related fields according to a set scheme, multiple levels of referentiality can be turn longish scripts into single lines. Spreadsheets, which are criticized for being 'flat' actually have some of the best support for it, if you don't mind formulas that look to the uninitiated as indecipherable as Perl looks to me.
But I don't think I'll be able to do it in SQL. When I feel like exploring more (rather than getting back to work or not working by writing this post) I'll see what temporary tables could accomplish, but if I can't pas computed strings as column names, I don't think I'll get very far.
One should be able to pass the results of that to another select statement, for instance the kind of statement I have at the top: _select sum(select column-name...) from table-name as select column-name..._ would return the sums of all integer columns, appropriately labeled. add a few constants in the outer select and you'd be ready to insert a TOTAL row in any tables whose constraints didn't prevent it.
(If Google+ has an escape character, I can't find it documented and I didn't feel like trial and error. those hyphens are underscores.)
I've been able to make most any environment I've worked in or toyed around with sing tunes like that. If you name related fields according to a set scheme, multiple levels of referentiality can be turn longish scripts into single lines. Spreadsheets, which are criticized for being 'flat' actually have some of the best support for it, if you don't mind formulas that look to the uninitiated as indecipherable as Perl looks to me.
But I don't think I'll be able to do it in SQL. When I feel like exploring more (rather than getting back to work or not working by writing this post) I'll see what temporary tables could accomplish, but if I can't pas computed strings as column names, I don't think I'll get very far.
no subject
Date: 2011-12-23 02:29 am (UTC)