Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases > Re: suggestions...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 61 Topic 366 of 386
Post > Topic >>

Re: suggestions for good graphical DB query builder

by DA Morgan <damorgan@[EMAIL PROTECTED] > Sep 28, 2007 at 12:23 PM

Martijn Tonies wrote:
>>>> Better to invest the money in good training than in a dumb-as-dirt
>>>> GUI.
>>> Although I do agree with you that an understanding of SQL helps
>>> you to write proper queries, your opinion about tools producing
>>> simplistic queries is a bit over the top, in my opinion.
>>>
>>> There are tools available that allow you to use derived tables,
>>> sub-selects, multiple unions, complex multi joins etc etc. It's not
>>> all "select * from ... " :-)
> 
> For your convenience, I've tried your examples in our own Query Builder
> included in Database Workbench, which is based on a third party product.
> 
>> Can you find INTERSECT and MINUS?
> 
> Yes, no problem whatsoever.
> 
>> Can you find WITH?
> 
> Parsed and used correctly, did notice a minor GUI error, re****ted
> to the vendor.
> 
>> Can you find the SAMPLE clause?
> 
> Can you give me an example? :)

SELECT *
FROM t
SAMPLE(1);

>> Can you find regular expressions?
>> Can you find the analytic functions?
>> Can you find CONNECT BY PRIOR?
> 
> I'm not sure what you mean by "find" here? You mean being able to
> select them from a list?

Can you write a query like any of these?

SELECT REGEXP_SUBSTR('Go to http://www.oracle.com/products
and click on 
database', 'http://([[:alnum:]]+\.?){3,4}/?')
RESULT
FROM dual;

SELECT submit_date, num_votes, TRUNC(AVG(num_votes)
OVER(PARTITION BY submit_date ORDER BY submit_date ROWS UNBOUNDED 
PRECEDING)) AVG_VOTE_PER_DAY
FROM vote_count
ORDER BY submit_date;

SELECT "Name", SUM(salary) "Total_Salary"
FROM (
   SELECT CONNECT_BY_ROOT last_name "Name", salary
   FROM employees
   WHERE department_id = 110
   CONNECT BY PRIOR employee_id = manager_id)
GROUP BY "Name";

>> How about CUBE? ROLLUP? GROUPING SETS? GROUP_ID?
>> Partition and subpartition selections?
>> Database links?
> 
> Not tested.

SELECT ch.channel_desc, calendar_month_desc, co.country_name,
TO_CHAR(SUM(s.amount_sold), '9,999,999,999') SALES$
FROM sales s, customers cu, times t, channels ch, countries co
WHERE s.time_id = t.time_id
AND s.cust_id = cu.cust_id
AND s.channel_id = ch.channel_id
AND ch.channel_desc IN ('Direct Sales', 'Internet')
AND t.calendar_month_desc IN ('2000-09', '2000-10')
AND co.country_name LIKE 'U%'
GROUP BY CUBE(channel_desc, t.calendar_month_desc, co.country_name);

SELECT channel_id, promo_id, SUM(amount_sold) s_sales,
GROUPING(channel_id) AS GC,
GROUPING(promo_id) AS GP,
GROUPING_ID(channel_id, promo_id) AS GCP,
GROUPING_ID(promo_id, channel_id) AS GPC
FROM sales
WHERE promo_id > 496
GROUP BY CUBE(channel_id, promo_id);

SELECT channel_desc, calendar_month_desc, co.country_id,
TO_CHAR(SUM(amount_sold) , '9,999,999,999') SALES$
FROM sales, customers, times, channels, countries co
WHERE sales.time_id=times.time_id
AND sales.cust_id=customers.cust_id
AND sales.channel_id= channels.channel_id
AND customers.country_id = co.country_id
AND channels.channel_desc IN ('Direct Sales', 'Internet')
AND times.calendar_month_desc IN ('2000-09', '2000-10')
AND co.country_iso_code IN ('UK', 'US')
GROUP BY GROUPING SETS(
(channel_desc, calendar_month_desc, co.country_id),
(channel_desc, co.country_id),
(calendar_month_desc, co.country_id));

SELECT DECODE(GROUPING(department_name), '1', 'All Departments',
department_name) AS DEPARTMENT,
DECODE(GROUPING(job_id), '1', 'All Jobs', job_id) AS job,
COUNT(*) "Total Empl", AVG(salary) * 12 "Average Sal"
FROM employees e, departments d
WHERE d.department_id = e.department_id
GROUP BY ROLLUP (department_name, job_id);

SELECT ch.channel_desc, t.calendar_month_desc, co.country_name,
TO_CHAR(SUM(s.amount_sold), '9,999,999,999') SALES$
FROM sales s, customers cu, times t, channels ch, countries co
WHERE s.time_id = t.time_id
AND s.cust_id = cu.cust_id
AND s.channel_id = ch.channel_id
AND cu.country_id = co.country_id
AND ch.channel_desc IN ('Direct Sales','Internet')
AND t.calendar_month_desc IN ('2000-09', '2000-10')
AND co.country_name LIKE 'U%'
GROUP BY ROLLUP(ch.channel_desc, t.calendar_month_desc, co.country_name);

>> or this?
>> SELECT COUNT(*)
>> FROM all_objs
>> WHERE data_object_id IS NOT NAN;
> 
> Parser failed on NAN, this surprised me as well, re****ted to the vendor.

Excellent.

>> or this?
>> SELECT *
>> FROM persons p
>> WHERE VALUE(p) IS OF TYPE (employee_t);
> 
> Parser failed on OF TYPE, this surprised me as well, re****ted to the
vendor.

Excellent. That you re****ted it not that it failed.

>> or this?
>> SELECT COUNT(*)
>> FROM customer_demo
>> WHERE cust_address_ntab IS NOT EMPTY;
> 
> Parser failed on EMPTY, not surprised anymore, re****ted to the vendor.

Not surprised either. Which was my original point.

Better tool than I would have thought: What is it.
-- 
Daniel A. Morgan
University of Wa****ngton
damorgan@[EMAIL PROTECTED]
 (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
 




 61 Posts in Topic:
suggestions for good graphical DB query builder
carol_marra@[EMAIL PROTEC  2007-09-18 12:37:37 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-18 17:23:40 
Re: suggestions for good graphical DB query builder
"Martijn Tonies"  2007-09-26 23:11:59 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-27 07:57:15 
Re: suggestions for good graphical DB query builder
"Martijn Tonies"  2007-09-28 11:24:35 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-28 12:23:43 
Re: suggestions for good graphical DB query builder
"Martijn Tonies"  2007-09-28 21:35:42 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-28 15:06:27 
Re: suggestions for good graphical DB query builder
David Segall <david@[E  2007-09-19 11:52:05 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-19 05:43:16 
Re: suggestions for good graphical DB query builder
David Segall <david@[E  2007-09-19 13:57:21 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-19 11:37:05 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-21 00:09:26 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-20 20:00:13 
Re: suggestions for good graphical DB query builder
David Segall <david@[E  2007-09-22 07:17:35 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-21 00:07:35 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-20 20:00:17 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-21 07:25:47 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-21 08:06:47 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-22 07:46:53 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-23 10:21:48 
Re: suggestions for good graphical DB query builder
carol_marra@[EMAIL PROTEC  2007-09-20 11:59:45 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-20 15:19:28 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-21 00:11:09 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-20 19:58:43 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-21 07:22:05 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-21 08:03:43 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-09-22 07:41:24 
Re: suggestions for good graphical DB query builder
"David Cressey"  2007-09-22 12:18:26 
Re: suggestions for good graphical DB query builder
Gene Wirchenko <genew@  2007-09-22 10:28:22 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-09-21 11:01:23 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-09-21 11:25:46 
Re: suggestions for good graphical DB query builder
nickyb <NOnickyb@[EMAI  2007-09-24 21:02:43 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-09-29 15:56:01 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-09-30 10:27:05 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-09-30 12:09:07 
Re: suggestions for good graphical DB query builder
"tommaso.gastaldi@[E  2007-10-01 03:43:30 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-10-01 21:14:11 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-01 17:38:55 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-10-02 09:24:34 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-02 08:18:51 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-01 04:03:05 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-01 17:38:12 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-01 13:42:20 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-01 17:40:35 
Re: suggestions for good graphical DB query builder
David Segall <david@[E  2007-10-02 06:49:08 
Re: suggestions for good graphical DB query builder
"Shakespeare" &  2007-10-02 11:52:28 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-02 08:24:15 
Re: suggestions for good graphical DB query builder
"Martijn Tonies"  2007-10-02 21:26:40 
Re: suggestions for good graphical DB query builder
Frank van Bortel <fran  2007-10-04 19:40:48 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-02 00:50:57 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-02 08:20:37 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-02 00:59:07 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-02 08:22:05 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-02 01:12:17 
Re: suggestions for good graphical DB query builder
DA Morgan <damorgan@[E  2007-10-02 08:23:08 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-02 04:17:52 
Re: suggestions for good graphical DB query builder
sergiy.korzh@[EMAIL PROTE  2007-10-02 04:42:52 
Re: suggestions for good graphical DB query builder
pamela fluente <pamela  2007-10-02 16:30:20 
Re: suggestions for good graphical DB query builder
"Tony Rogerson"  2007-10-02 18:29:12 
Re: suggestions for good graphical DB query builder
Last Boy Scout <BadBil  2007-10-09 23:57:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 12:56:36 CDT 2008.