Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8874363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:42:03+00:00 2026-06-14T18:42:03+00:00

Okay hello there I have 2 tables Route table which has route ID, frequency,

  • 0

Okay hello there I have 2 tables

Route table which has

route ID, frequency, start destination, final destination

and

Operates table which has

Proportion, Operator name, Route ID

I need to select Route id and frequency where the operator name is Arriva.

I put this SQL together which works and gets me the result but I am not sure if this is the correct way of doing it.

SELECT route_number, frequency
FROM route, operates
WHERE route_ID = route_number
AND operator_name =  'Arriva'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:42:04+00:00Added an answer on June 14, 2026 at 6:42 pm

    It is the right way, just that your first where statement is wrong:

    SELECT route_number, frequency
    FROM route, operates
    WHERE route_ID = **route_number**
    AND operator_name =  'Arriva'
    

    It should be route_ID as well (at least from what you said). In order for this to work you need to give names to your tables, so SQL knows which columns you are comparing (since the names are the same from both tables). Like this:

    SELECT 
        route_number, 
        frequency
    FROM 
        route r, 
        operates o
    WHERE 
        r.route_ID = o.route_number
        AND o.operator_name =  'Arriva'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello there okay so this is the deal i have my mp3 files on
Hello there okay so this is the deal i have a folder where my
okay, i'm setting up a multi-user chat system. i have a messages table, that
Okay, so eclipse says my code has errors in it, but there are no
I have some serious problems with my app right now. Okay, so there are
Hello I have a Class Called EmpowerCalendarCode: It has the following fields CalendarCode, CalendarName,
Okay, I have a multi-dimensional array which is statically-allocated. I'd very much like to
struct X { constexpr static char a1[] = hello; // Okay constexpr static const
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay this question is very simple: I have a facebook page, and a website.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.