Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

ANSI SQL | Forum profile

Forum profile page for ANSI SQL on http://www.dbforums.com. This report page is the aggregated overview from a single forum: ANSI SQL, located on the Message Board at http://www.dbforums.com. This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period. Additional forum profile information for "ANSI SQL" on the Message Board at http://www.dbforums.com is also shown in the following ways:

1) Latest Active Threads
2) Hot Threads for Last Week

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.

Site: dBforums - Database Support Community - ANSI SQL (site profile, domain info dbforums.com)
Title: ANSI SQL
Url: http://www.dbforums.com/ansi-sql/
Users activity: 36 posts per thread
Forum activity: 1 active thread during last week
 

Posting activity on ANSI SQL:

  Week Month 3 Months
Threads: 1 18 27
Post: 1 54 97
 

ANSI SQL Posting activity graph:

Posts by:  day  week  month 

Top authors during last week:

Name
Posts
Peter.Vanroose
1
user's latest post:
query to display gaps in dates
Published (2009-11-11 18:12:00)
Quote: Originally Posted by gvee Your best option is to have a calendar table! That would indeed also be my preferred path. Some database systems support recursive SQL to generate such a table "on the fly". Most others will support it in the near future. With recursive SQL, the query becomes: Code: WITH calendar (date_field) AS RECURSIVE (SELECT CAST('2009-01-01' AS datetime) AS date_field UNION ALL SELECT...
 

Latest active threads on ANSI SQL::

dBforums - Database Support Community
Started 1 week, 4 days ago (2009-11-03 15:21:00)  by scooby_at_work
It's always a little tricky to ask a SQL database about stuff that doesn't exist. It's also tricky to ask a SQL database about the difference between rows. You'll need to find all the rows in datePool such that date + 1 doesn't exist, and you need the extent of the gap: Code: select distinct o.dateCol + 1 as start_dt, (select min(i.dateCol) from yourTable i where i.dateCol...
Thread:  Show this thread (4 posts)   Thread info: query to display gaps in dates Size: 1,305 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: It's always a little tricky to ask a SQL database about stuff that doesn't
exist. It's also tricky to... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 2 weeks, 2 days ago (2009-10-29 10:37:00)  by BettingSherlock
Hang on, found a reference that would indicate this syntax which also works with MySQL but not entirely sure its ANSI SQL : INSERT INTO table (fieldA,fieldB,fieldC) VALUES("text", NULL ,12345); Would appreciate a confirmation form anyone who knows ?
Thread:  Show this thread (17 posts)   Thread info: how do i insert a null value from a script ? Size: 309 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Hang on, found a reference that would indicate this syntax which also works
with MySQL but not entirely sure... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 2 weeks, 3 days ago (2009-10-28 14:29:00)  by r937
Code: SELECT t.NAME , t.ANNUAL_RT , t.Acct_CD , t.DIST_PCT , t.FUNDING_BEG_DT , t.JOB_EFFSEQ , t.ACTION_DT FROM ( SELECT Acct_CD , MAX(ACTION_DT) AS max_date FROM daTable GROUP BY Acct_CD ) AS m INNER JOIN daTable AS t ON t.Acct_CD = m.Acct_CD AND t.ACTION_DT = m.max_date ORDER...
Thread:  Show this thread (3 posts)   Thread info: SQL Query Help (Please) Size: 834 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Code:

SELECT t.NAME
     , t.ANNUAL_RT
     , t.Acct_CD
     , t.DIST_PCT
     , t.FUNDING_BEG_DT
     , t.JOB_EFFSEQ
     , t.ACTION_DT
  FROM ( SELECT Acct_CD... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 2 weeks, 5 days ago (2009-10-27 07:28:00)  by r937
Code: SELECT cnt , COUNT(*) AS count_of_cnt FROM ( SELECT COUNT(*) AS cnt , date FROM reports GROUP BY date ) AS d GROUP BY cnt
Thread:  Show this thread (4 posts)   Thread info: aggregate of an aggregate Size: 607 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Code:

SELECT cnt
     , COUNT(*) AS count_of_cnt
  FROM ( SELECT COUNT(*) AS cnt
              , date 
           FROM reports 
         GROUP 
             BY... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 3 days ago (2009-10-22 02:54:00)  by antigenius
oh i just found out how to do it.. select maj_code, count(*) from student group by maj_code having count(*) =(select max(count(*)) from student group by maj_code) but sorry I didn't mention the whole question that is display the name of the major that has the least number of advisors but the largest number of students. and now i am having MAJ_CODE ...
Thread:  Show this thread (6 posts)   Thread info: Using count(*) in where question Size: 974 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: oh i just found out how to do it..

select maj_code, count(*)
from student
group by maj_code
having count(*)... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 3 days ago (2009-10-21 11:58:00)  by gvee
Two options 1) Move the where clause to the JOIN predecate Code: SELECT kurs.kursnamn , Count(kurstillf.kid) As number FROM kurs LEFT JOIN kurstillf ON kurs.kid = kurstillf.kid AND kurstillf.year = 2008 GROUP BY kurs.kursnamn 2) Move the WHERE clause in to a derived table Code: SELECT kurs.kursnamn , Count(kurstillf.kid) As...
Thread:  Show this thread (6 posts)   Thread info: beginner question! Size: 1,157 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Two options

1) Move the where clause to the JOIN predecate
Code:

SELECT kurs.kursnamn
     , Count(kurstillf.kid) As number
FROM... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 4 weeks ago (2009-10-17 18:28:00)  by r937
Quote: Originally Posted by andierosebud Is the above correct ... what happpened when you tested it? Quote: Originally Posted by andierosebud ... or is there another way to do this using an ANSI Join? actually, the old style of joins is also compatible with ANSI SQL --...
Thread:  Show this thread (2 posts)   Thread info: ANSI syntax for joining 4 tables-am I correct? Size: 1,414 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Quote:

	Originally Posted by andierosebud Is the above correct ...

what happpened when you tested it?

Quote:

	Originally Posted... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 1 month ago (2009-10-14 03:35:00)  by JarlH
I'm not sure moving the sub-selects will improve the performance. A four-way (left outer?) join may also be utterly slow if you haven't got the appropriate indexes. And if you have the indexes, the current query will be pretty fast.
Thread:  Show this thread (9 posts)   Thread info: Trying to get rid of subqueries Size: 249 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: I'm not sure moving the sub-selects will improve the performance. A
four-way (left outer?) join may also be utterly... :: ANSI SQL :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 1 month ago (2009-10-14 03:02:00)  by JarlH
Why do you want 2009-10-04 10 to be returned? That day has only one total-value. For the rest of the rows the following query returns the result you are asking for: SELECT date, MAX(total) - MIN(total) FROM tablename GROUP BY date Note that DATE is a reserved word in ANSI SQL. It's a good idea to avoid reserved words as column names. (Or do at least double quote them, i.e "...
Thread:  Show this thread (2 posts)   Thread info: How to Return Moving Differences with Grouping? Size: 494 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Why do you want 2009-10-04 10 to be returned? That day has only one
total-value.

For the rest of... :: ANSI SQL :: dBforums - Database Support Community"
 

Hot threads for last week on ANSI SQL::

ANSI SQL
Started 1 week, 4 days ago (2009-11-03 15:21:00)  by scooby_at_work
It's always a little tricky to ask a SQL database about stuff that doesn't exist. It's also tricky to ask a SQL database about the difference between rows. You'll need to find all the rows in datePool such that date + 1 doesn't exist, and you need the extent of the gap: Code: select distinct o.dateCol + 1 as start_dt, (select min(i.dateCol) from yourTable i where i.dateCol...
Thread:  Show this thread (4 posts)   Thread info: query to display gaps in dates Size: 1,305 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: It's always a little tricky to ask a SQL database about stuff that doesn't
exist. It's also tricky to... :: ANSI SQL :: dBforums - Database Support Community"