1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Levart [38]
3 years ago
13

Write a SELECT statement that returns four columns from the Invoices table, named Number, Total, Credits, and Balance: Number Co

lumn alias for the InvoiceNumber column Total Column alias for the InvoiceTotal column Credits Sum of the PaymentTotal and CreditTotal columns Balance InvoiceTotal minus the sum of PaymentTotal and CreditTotal Use the AS keyword to assign column aliases.
Computers and Technology
1 answer:
AleksAgata [21]3 years ago
7 0

Answer and Explanation:

For returning four columns from the  Invoices table, named Number, Total, Credits, and Balance the SELECt statement is as follows

Select     Invoice Number     As     Number

              Invoice Total          As      Total

Payment total + credit total  As      Credits

Invoice total

(Payment total + credit total) As     Balance

These are displayed as above

You might be interested in
Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
Neko [114]

The following java code will be written for the prescribed

<u>Explanation:</u>

import java.util.*;

class UserName{

  ArrayList<String> possibleNames;

  UserName(String firstName, String lastName){

      if(this.isValidName(firstName) && this.isValidName(lastName)){

          possibleNames = new ArrayList<String>();

          for(int i=1;i<firstName.length()+1;i++){

              possibleNames.add(lastName+firstName.substring(0,i));

          }  

      }else{

          System.out.println("firstName and lastName must contain letters only.");

      }

  }

  public boolean isUsed(String name, String[] arr){

      for(int i=0;i<arr.length;i++){

          if(name.equals(arr[i]))

              return true;

      }

      return false;

  }

  public void setAvailableUserNames(String[] usedNames){

      String[] names = new String[this.possibleNames.size()];

      names = this.possibleNames.toArray(names);

      for(int i=0;i<usedNames.length;i++){

          if(isUsed(usedNames[i],names)){

              int index = this.possibleNames.indexOf(usedNames[i]);

              this.possibleNames.remove(index);

              names = new String[this.possibleNames.size()];

              names = this.possibleNames.toArray(names);

          }

      }

  }

  public boolean isValidName(String str){

      if(str.length()==0) return false;

      for(int i=0;i<str.length();i++){

          if(str.charAt(i)<'a'||str.charAt(i)>'z' && (str.charAt(i)<'A' || str.charAt(i)>'Z'))

              return false;

      }

      return true;

  }

  public static void main(String[] args) {

      UserName person1 = new UserName("john","smith");

      System.out.println(person1.possibleNames);

      String[] used = {"harta","hartm","harty"};

      UserName person2 = new UserName("mary","hart");

      System.out.println("possibleNames before removing: "+person2.possibleNames);

      person2.setAvailableUserNames(used);

      System.out.println("possibleNames after removing: "+person2.possibleNames);

  }

}

7 0
4 years ago
. It is essential for a relay energized by alternating current to have A. many turns of small wire. B. a laminated core and a sh
Tomtit [17]
The correct answer is B, a laminated core and a shading coil.

A key difference in an AC relay is the presence of a "shading coil". The purpose of this coil is to keep the relay on when the current drops to zero during phase change (note that in AC power the current and voltage are alternating in a sine wave around 50/60 times per second). The shading coil retains some magnetic energy and essentially holds the relay ON when the current drops to zero momentarily due to the AC waveform.

AC relays also have a laminated core to prevent losses due to eddy current heating.
6 0
4 years ago
Technology has increased the success of the medical field. Which examples of technology have had a great impact on the medical f
Korolek [52]

Answer:

x-rays and ultrasounds

8 0
3 years ago
Read 2 more answers
This is going to get taken down but I dont care add me on discord cause ima bored<br> -Red-#9847
Alex777 [14]

Answer:

I WILL

Explanation:

6 0
3 years ago
Given a variable temps that refers to a list, all of whose elements refer to values of type float , representing temperature dat
VARVARA [1.3K]

Answer:

The problem of the question code is as follows:

Explanation:

  1. There must be the items in the list: The above question code is in python language. The temps are a list type variable that is used to hold the collection of items or value. But in the above code, there is no item in the K list. So first remove this problem with the help of add the value on the list. There are two ways to add value to the list:- 1. Define the static list element by writing like "temps=[1.2,2.4,4.5]". and 2. Take input from the user and then add by "temps.append(item)".
  2. The syntax of the for loop: The syntax of the for loop is not right because it holds the "range" keyword which is written when we give the numeric value like, "for x in range(2)" or "for x in range(1,2)". So to correct for syntax the user needs to write "for k in temps:".

If the user removes the above-defined error from the code then the above code will run correctly

5 0
3 years ago
Other questions:
  • When might it be necessary or advisable to write a shell script instead of a shell function? give as many reasons as you can thi
    15·1 answer
  • A display that is thin, flexible, light, and easy to read in all types of light is
    9·2 answers
  • ____ refers to data, applications, and even resources stored on computers accessed over the Internet. Answer
    5·1 answer
  • What does an operating system do?
    11·2 answers
  • Which type of exception would be detected if you used the conversion command Convert.ToDecimal to try to convert an ampersand?
    14·1 answer
  • If you were investigating login issues on a Windows computer, which portion of the Event Viewer logs would be a good place to st
    7·1 answer
  • The ability to send and receive transmissions at the same time on an ethernet cable is referred to by what term?
    7·1 answer
  • The ____ object can trigger a selectedindexchanged event when a selection is made
    5·1 answer
  • Por favor definir que es un pseudocódigo y que es un diagrama de flujo.
    13·2 answers
  • What is a key differentiator of Conversational Artificial Intelligence (AI)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!