473,434 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Whats wrong with this SQL Query

I am trying to get the top-rated films involving people (in any role) who have
received a Best Actor Oscar? For ‘top-rated’ assume a film rating of at
least 8 out of 10.


Expand|Select|Wrap|Line Numbers
  1. SELECT     FilmID, FilmTitle, FilmRating
  2. FROM         Film
  3. Where
  4.     FilmRating > 7.9
  5. GROUP BY FilmID, FilmTitle, FilmRating
Expand|Select|Wrap|Line Numbers
  1. SELECT     Person.PersonID, Person.FirstName, Person.Surname, AwardType.AwardTypeDescription
  2. FROM         Person CROSS JOIN
  3.                       AwardType
  4. WHERE     (AwardType.AwardTypeDescription = 'Oscar')
  5. GROUP BY Person.PersonID, Person.FirstName, Person.Surname, AwardType.AwardTypeDescription
tables
Expand|Select|Wrap|Line Numbers
  1. RoleType(RoleTypeID, RoleTypeDescription)
  2. Film(FilmID, FilmTitle,Release Date, GenreID, StudioID, FilRating, Plot)
  3. Role(RoleID, RoleTypeID, PersonID)
  4. Person(PersonID, FName, Sname, NationalityID, GenderID, GenderDescription)
  5. Award(AwardID, RoleID, AwardDEscription, AwardType, YearAwarded)
  6. AwardType(AwardTypeID, AwardTypeDescription)
  7. AwardCategory(AwardCategoryID, AwardTypeDescription)
May 15 '10 #1
1 1406
ck9663
2,878 Expert 2GB
Looks like you don't have a link between Film and Person. You must have a table with the filmId and all the cast on it via personid.

Good Luck!!!

~~ CK
May 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Chris Geerdink | last post by:
combo with PHP. what is wrong with the Javascript? else { include("mysql.php"); $query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES ('".$_POST."', '".$_POST."',...
4
by: asdf | last post by:
Hello! Can someone tell me whats wrong with this piece of code: Option Compare Database Option Explicit Sub retrieve() Dim rst As ADODB.Recordset Dim i As Integer
5
by: Alexandre Martins | last post by:
Provider=Microsoft.Jet.OLEDB.4.0;UserId=Admin;Password=teste;Data Source=C:\Inetpub\wwwroot\inktoner\dados\db_inktoner.mdb;Persist Security Info=True I can't connect in my database ! whats...
1
by: aa | last post by:
When I am reading from local disk (d:), everithing is OK, but then I am reading from map disk I am geting the this error. Whats wrong. Thanks Server Error in '/Extra' Application....
3
by: mahsa | last post by:
Hi do you know whats wrong with this code? <asp:HyperLink id="HLink_Help" runat="server" NavigateUrl='<%# "javascript:window.open('comments.aspx?id=1,width=500,height=600, scrollBars=yes');"...
1
by: '~=_Slawek_=~' | last post by:
$DOW = (jddayofweek(unixtojd(mktime(1, 1, 1, $month, $day, $year)))+6)%7; $DOW= (jddayofweek(juliantojd($month, $day, $year))+6)%7; The results are supposed to be the same, but they are not....
7
by: Mike Barnard | last post by:
It's a simple test... VERY SIMPLE. But... In an external stlyesheet some attributes don't show. With the same styles cut and pasted to the test internally it works as expected. Anyone tell...
13
by: pankajit09 | last post by:
Whats wrong in the following query --> SELECT SUM(bookings),SUM(invoices),SUM(segments),SUM(totalgross),SUM(totalsale),SUM(commission),SUM(tax),SUM(SELECT grossfare FROM salesqww where type="cash...
5
by: islayer | last post by:
can someone tell me what is wrong with the bold code? i am just learning perl. the program should create a perl file with a random name (5 letters, followed by a number), but the name is always just...
1
by: x40 | last post by:
I try to learn python thru solving some interisting problem, found google trasure hunt, write first program ( but cant find whats wrong). # Unzip the archive, then process the resulting files to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.