Quest Software SQL Navigator Professional Edition 3.2 (PRO-NAV-PK) for PC Logo

Related Topics:

Posted on Sep 14, 2010

Create the SQL that would generate a list of cities and a count of the number of vendors within each city. Order the data by city in ascending order.

1 Answer

Anonymous

Level 1:

An expert who has achieved level 1.

New Friend:

An expert that has 1 follower.

  • Contributor 3 Answers
  • Posted on Dec 16, 2010
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

New Friend:

An expert that has 1 follower.

Joined: Dec 16, 2010
Answers
3
Questions
0
Helped
556
Points
3

SELECT syudad.city, count(vendor.city) FROM syudad INNER JOIN vendor ON syudad.City = vendor.city group by syudad.city;

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
2answers

How did the film ends?

The film ends with the Runts walking around the City of God, making a hit list of the dealers they plan to kill to take over the drug business, including the Red Brigade.
0helpful
1answer
1helpful
1answer

Construct both an ungrouped and a grouped frequency distribution for the data given below: 139 130 128 134 140 139 136 130 136 128 138 137 134 128 127 136 140 132 141

Sorry to disappoint you but I will just give you directions to do it yourself.
Ungrouped
First sort the data in ascending order (from lowest to highest value)
Create a two-column table
In the first column enter a data value.
In the second column enter the frequency of a data item
Count how many times one particular data value appears in the set (how many repetitions). If it appears only once, its frequency is 1; twice, frequency 2, etc.
For each single (different) data value complete the frequency column.

Grouped
For grouped data representations you create classes: A class is just an interval of values, for example between [125, 130[
For each class interval you create, count how many data values fall within the interval. For the class given as example it will encompass all values between 125 and 129, It I counted correctly its frequency is 4.
Complete the frequency table for the class.

How many classes should you create? Usually this information is given to you. If not, create a moderate number of classes (4,5) It depends on the span of the distribution (highest value- lowest value). The intervals should have equal length. Read your instructions.
3helpful
1answer

How do i convert my numbers in ascending order?

How do you sort the data in ascending order? I scanned the guidebook several times and could not find any reference to sorting the data in any order. It looks like you have to enter the data in lists, already sorted by you. Sorry
0helpful
1answer

Trying to type in an address on my 1st gps.

Hello,

The manual can be downloaded from Garmin.
www.garmin.com/manuals/3130_OwnersManual.pdf

1. Touch Where To? > Address.
2. Change the state, the country, or the province, if necessary.
3. Touch Search All. If you know the city, touch Spell City, enter the city/postal code, and touch Done. Select the city/postal code in the list. (Not all map data provides postal code searching.)
4. Enter the number of the address, and touch Done.
5. Enter the street name, and touch Done.
6. Select the correct street in the list, if necessary.
7. Touch the address, if necessary.
0helpful
1answer

PHP/SQL Problem

have you read the dataset in (i.e $row)?
you would require some sort of select statement to read the data frm sql into a dataset before yopu can read and display each record in the dataset.

i gather you may be new to sql statements. the bottom commect $query.... is reading the dataset into $query, the one you have issues with needs code that reads a record into $row
13helpful
1answer

How to sort the number data in order in L1 for ex L1 -> L1 3 2 2 3 7 4 4 5 5 7 like that thanks

There are two functions available for sorting lists. Access them via [2nd] [List] "OPS".

SortA(list) sorts the list into ascending order.
SortD(list) sorts the list into descending order.
0helpful
1answer

How do u create a profile it keeps on sayin tht i havent chose a city and my zip code is wrong pls help!!!!

Every city has its own zip code and postal code. Now in order to create a profile that has a correct city name and zip code, first you must have a list of correct zip code in every city in the world or in you place.  In that way if you input correct zip code that corresponds the correct city name then ath's the time it will stop the pop up stating wrong zip or city name.  you can refer to this site for more infor bout the zip code in the world http://embassyworld.com/data/Zip_Codes.html


Thanks
0helpful
1answer

Directions without specific address

From the Main Menu, tap the Enter Address icon.
2. Select the method to enter the city: Enter City, Enter Zip Code, or Previous City.
Enter City:
Use the keypad to enter the first few
characters of the city name. Tap OK to
display the list of cities found.
The button in the lower right corner is used
to select the sorting order of the list, by zip
code or alphabetically.
Tap on the desired city in the list.
This is the way I do it. Then I get the # of miles to the city.
Good luck & have fun.
0helpful
1answer

Export data in excel sheet and in specific column

I did not write this but look towards the end of the code and it will give you an idea on how to do it

Sub ExportToExcel(strOutputFile As String, Optional boolSuppressMessages As Boolean = False)

Dim strTemplateFile As String
Dim fso As Scripting.FileSystemObject
Dim cnn As ADODB.Connection
Dim rstTarget As ADODB.Recordset
Dim rstCustomers As ADODB.Recordset
Dim rstServiceReps As ADODB.Recordset

On Error GoTo ErrorHandler: On Error GoTo 0

Set fso = New Scripting.FileSystemObject

' Get template file path
strTemplateFile = CurrentProject.path & "\CompaniesEmployeesList.xlt"

' Copy template to the target
fso.CopyFile strTemplateFile, strOutputFile, False

' Open a connection to the workbook
Set cnn = New ADODB.Connection
cnn.Provider = "Microsoft.Jet.OLEDB.4.0"
cnn.ConnectionString = "Data Source=" & strOutputFile & ";" & _
"Extended Properties=""Excel 8.0"""
cnn.Mode = adModeReadWrite
cnn.Open

' Open the target recordset (the Excel sheet)
Set rstTarget = New ADODB.Recordset
rstTarget.Open "SELECT [ID], [Name], [City] " & _
"FROM [Sheet1$]", cnn, adOpenDynamic, adLockOptimistic

' Open Customer data recodset
Set rstCustomers = New ADODB.Recordset
rstCustomers.Open "SELECT CompanyID, CompanyName, City " & _
"FROM Customers " & _
"WHERE City = 'Madrid' " & _
"ORDER BY CompanyName", CurrentProject.Connection

' Open Service Rep data recodset
Set rstServiceReps = New ADODB.Recordset
rstServiceReps.Open "SELECT EmployeeID, [LastName] & "", "" & [FirstName] AS Name, City " & _
"FROM Employees " & _
"WHERE City = 'Madrid' " & _
"ORDER BY [LastName]", CurrentProject.Connection

' Loop through Customers result set and copy to target
Do While Not rstCustomers.EOF
rstTarget.AddNew
rstTarget![ID] = rstCustomers!CompanyID
rstTarget![Name] = rstCustomers!CompanyName
rstTarget![City] = rstCustomers!City
rstCustomers.MoveNext
Loop

' Insert blank line between result sets.
rstTarget.AddNew
rstTarget![ID] = ""
rstTarget![Name] = ""
rstTarget![City] = ""
rstTarget.Update

' Loop through Service Reps result set and copy to target
Do While Not rstServiceReps.EOF
rstTarget.AddNew
rstTarget![ID] = rstServiceReps!EmployeeID
rstTarget![Name] = rstServiceReps!Name
rstTarget![City] = rstServiceReps!City
rstTarget.Update
rstServiceReps.MoveNext
Loop

rstTarget.Close
rstCustomers.Close
rstServiceReps.Close

cnn.Close

If Not boolSuppressMessages Then
MsgBox "Workbook Created", vbInformation + vbOKOnly, "ExcelExport"
End If

ExitHere:
On Error Resume Next
Set rstTarget = Nothing
Set cnn = Nothing
Set rstCustomers = Nothing
Set rstServiceReps = Nothing
Exit Sub

ErrorHandler:
Eval "MsgBox(""Error " & Err.Number & "@" & Err.Description & "@"")"

On Error Resume Next

If Not cnn Is Nothing Then
cnn.Close
End If

Resume ExitHere

End Sub
Not finding what you are looking for?

386 views

Ask a Question

Usually answered in minutes!

Top Quest Software Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Quest Software Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...