<!--- Retrieve Films and Related Actors from database --->
<CFQUERY NAME="GetFilmInfo" DATASOURCE="#REQUEST.DataSource#">
  SELECT 
    f.FilmID, f.MovieTitle, 
    r.Rating
  FROM Films f LEFT OUTER JOIN 
       FilmsRatings r ON f.RatingID = r.RatingID
  ORDER BY f.MovieTitle
</CFQUERY>

<HTML>
<HEAD><TITLE>Film Ratings</TITLE></HEAD>
<BODY>
<H2>Film Ratings</H2>

<!--- Display retrieved information in HTML table --->
<CFTABLE QUERY="GetFilmInfo" HTMLTABLE BORDER COLHEADERS>
  <CFCOL HEADER="Film ID" TEXT="#FilmID#">
  <CFCOL HEADER="Film Title" TEXT="#MovieTitle#">
  <CFCOL HEADER="Rating" TEXT="#Rating#">
</CFTABLE>

</BODY>
</HTML>