473,624 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show 4 Records that occur more often...and how often they occur.

Hello,

i have a dataSet in an ASP.Net / VB page which connects to a database named
"DB" with fields AuthorName, BookTitle, BookEditor.

I want do display 4 records in my page as follows:
Author Name # Number of books published by this Author (Number of records
associated with this Author)

I want to display the 4 Authors which published more books...

In conclusion:
I want to show the 4 AuthorName values which appear more often in the
database and display the number of records having that AuthorName.

Can you help me out?

How should my SQL look? What do i need to add?

Thank You,
Miguel
Nov 20 '05 #1
5 985
Is this for homework?
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

i have a dataSet in an ASP.Net / VB page which connects to a database named "DB" with fields AuthorName, BookTitle, BookEditor.

I want do display 4 records in my page as follows:
Author Name # Number of books published by this Author (Number of records associated with this Author)

I want to display the 4 Authors which published more books...

In conclusion:
I want to show the 4 AuthorName values which appear more often in the
database and display the number of records having that AuthorName.

Can you help me out?

How should my SQL look? What do i need to add?

Thank You,
Miguel

Nov 20 '05 #2
I am not very confortable with SQL...and that's why i sent the post.
....but i can allways give you lessons of Actionscript, Flash, Genetic
Alghoritms, Fuzzy Control and so on...

Cheers,
Miguel
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:#s******** ******@TK2MSFTN GP09.phx.gbl...
Is this for homework?
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

i have a dataSet in an ASP.Net / VB page which connects to a database

named
"DB" with fields AuthorName, BookTitle, BookEditor.

I want do display 4 records in my page as follows:
Author Name # Number of books published by this Author (Number of

records
associated with this Author)

I want to display the 4 Authors which published more books...

In conclusion:
I want to show the 4 AuthorName values which appear more often in the
database and display the number of records having that AuthorName.

Can you help me out?

How should my SQL look? What do i need to add?

Thank You,
Miguel


Nov 20 '05 #3
I understand that. I have no problem helping you with homework, but I just
want to make sure you learn it...

post your sql and we'll take a look at it...
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:u4******** ******@TK2MSFTN GP09.phx.gbl...
I am not very confortable with SQL...and that's why i sent the post.
...but i can allways give you lessons of Actionscript, Flash, Genetic
Alghoritms, Fuzzy Control and so on...

Cheers,
Miguel
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:#s******** ******@TK2MSFTN GP09.phx.gbl...
Is this for homework?
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

i have a dataSet in an ASP.Net / VB page which connects to a database

named
"DB" with fields AuthorName, BookTitle, BookEditor.

I want do display 4 records in my page as follows:
Author Name # Number of books published by this Author (Number of

records
associated with this Author)

I want to display the 4 Authors which published more books...

In conclusion:
I want to show the 4 AuthorName values which appear more often in the
database and display the number of records having that AuthorName.

Can you help me out?

How should my SQL look? What do i need to add?

Thank You,
Miguel



Nov 20 '05 #4
Don't worry God...there was somebody more humble than you which allready
helped me...

Cheers,
Miguel

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op******** ******@TK2MSFTN GP10.phx.gbl...
I understand that. I have no problem helping you with homework, but I just want to make sure you learn it...

post your sql and we'll take a look at it...
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:u4******** ******@TK2MSFTN GP09.phx.gbl...
I am not very confortable with SQL...and that's why i sent the post.
...but i can allways give you lessons of Actionscript, Flash, Genetic
Alghoritms, Fuzzy Control and so on...

Cheers,
Miguel
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:#s******** ******@TK2MSFTN GP09.phx.gbl...
Is this for homework?
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
> Hello,
>
> i have a dataSet in an ASP.Net / VB page which connects to a database named
> "DB" with fields AuthorName, BookTitle, BookEditor.
>
> I want do display 4 records in my page as follows:
> Author Name # Number of books published by this Author (Number of
records
> associated with this Author)
>
> I want to display the 4 Authors which published more books...
>
> In conclusion:
> I want to show the 4 AuthorName values which appear more often in the > database and display the number of records having that AuthorName.
>
> Can you help me out?
>
> How should my SQL look? What do i need to add?
>
> Thank You,
> Miguel
>
>



Nov 20 '05 #5
Well good for you.

"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:ec******** ******@TK2MSFTN GP10.phx.gbl...
Don't worry God...there was somebody more humble than you which allready
helped me...

Cheers,
Miguel

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op******** ******@TK2MSFTN GP10.phx.gbl...
I understand that. I have no problem helping you with homework, but I

just
want to make sure you learn it...

post your sql and we'll take a look at it...
"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:u4******** ******@TK2MSFTN GP09.phx.gbl...
I am not very confortable with SQL...and that's why i sent the post.
...but i can allways give you lessons of Actionscript, Flash, Genetic
Alghoritms, Fuzzy Control and so on...

Cheers,
Miguel
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:#s******** ******@TK2MSFTN GP09.phx.gbl...
> Is this for homework?
>
>
> "Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
> news:eT******** ******@TK2MSFTN GP10.phx.gbl...
> > Hello,
> >
> > i have a dataSet in an ASP.Net / VB page which connects to a database > named
> > "DB" with fields AuthorName, BookTitle, BookEditor.
> >
> > I want do display 4 records in my page as follows:
> > Author Name # Number of books published by this Author (Number of > records
> > associated with this Author)
> >
> > I want to display the 4 Authors which published more books...
> >
> > In conclusion:
> > I want to show the 4 AuthorName values which appear more often in the > > database and display the number of records having that AuthorName.
> >
> > Can you help me out?
> >
> > How should my SQL look? What do i need to add?
> >
> > Thank You,
> > Miguel
> >
> >
>
>



Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2278
by: David Ehmer | last post by:
The code below is 2 rows in a table, the top row contains a message to be shown if the recordset returns no matches. The 2nd row will display any matches. Problem is that if no matches are found nothing is displayed in this table. I have used the code that DMX generates using the server behaviour 'Show region if recordset is empty', but no success. Appreciate someone pointing out where I'm going wrong here.
6
3814
by: asad | last post by:
Hi, i have some problem in showing data. I have two tables First table(containing Hosting categories) Second table(Containg catagories data lik url,keyword,description.....etc) I want to display catgories names from first table and then diffren catagories total records from second table, like this
8
1781
by: mgm | last post by:
hello, I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it is more than 1 record and alert the user to contact the database administrator. How can I get the count of records returned by a recordset? Is there no way besides looping through with a counter variable?
5
2304
by: Rob Ristroph | last post by:
Hi, It's pretty unhelpful to post "I have a huge piece of code that crashes in strange places, what's the problem?" but that's basically my problem and I really am at my wit's end. The piece of code in question always crashes in an STL operation such as a vector.push_back, but the location of the crash changes as I change how various parts are handled in memory, i.e., make some things dynamically allocated instead of new'd. I know...
27
2144
by: Alex | last post by:
Hi, MySQL has a nice feature that allows to call a replace rather insert which will attempt to insert if record not present and replace if it does. Is there any similar feature ? Currently I run a select prior to any insert and then update or insert depending on the result of the select. The problem here is that I just doubled the queries. Doing so on a table with 5Mio rows and on 100k inserts will take time and I would like to have...
6
2122
by: Damon Grieves | last post by:
Hi I just want to be sure I understand how the Access client works. If I have an Access back end with a million records on a server and an Access client. If the client is installed on the users pc and run by the user...does Access drag the whole million records across the LAN when we call up one record ie filters for that record locally? If the client is on the same server as the back end, and the user starts up the client on the server...
15
2710
by: Hi5 | last post by:
Hi, I am designing a database for a client in which It has a client table including the followings: 1-Table Client 2-Table lookupcategory 3-Table Ctegory
4
1081
by: Miguel Dias Moura | last post by:
Hello, i have a dataSet in an ASP.Net / VB page which connects to a database named "DB" with fields AuthorName, BookTitle, BookEditor. I want do display 4 records in my page as follows: Author Name # Number of books published by this Author (Number of records associated with this Author) I want to display the 4 Authors which published more books...
5
4011
by: JSParker1 | last post by:
Summary: Maximum number of records per second that can be inserted into SQLServer 2000. I am trying to insert hundreds (preferably even thousands) of records per second in to SQLServer table (see below) but I am getting the following error in the Windows Event Viewer Application log file: "Insufficent Memory......" And very few records were inserted and no errors where sent back via
3
2556
by: Andy_Khosravi | last post by:
I'm having a problem with an entry form on one of my applications. It would appear that the save action is sometimes not working, and is generating no error when it fails. I'm hoping one of you may have some insight into what is causing the problem. I'll describe only the general outline since the actual code is several pages long. 1. Entry form opened in Data Entry mode 2. Global variable SaveRec set to False on form load.
0
8233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8170
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8334
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.