Write an SQL query that returns a list of invoices

Assignment Help C/C++ Programming
Reference no: EM132369349

Task 1 -

Given a table invoice_items with the following structure:

create table invoice_items (

inv_num integer not null,

item varchar(10) not null,

price integer not null

);

Write an SQL query that returns a list of invoices (inv_num) with the total price of each (sum). The list should be ordered by inv_num (in descending order).

Task 2 -

Write a Bash script that computes the sum of the absolute values of integers given by standard input.

The numbers are given in a single line, separated by a space. You should print the sum of their absolute values to standard output.

In your solution, focus on correctness The performance of your solution will not be focus of the assessment.

Task 3 -

Write a Bash script that organizes a given directory.

We have a directory containing: music, videos, images, logs and perhaps other files. Your task is to organize files into categories and get rid of some of them.

Specifically, after your script has made changes, the directory should appear as follows:

  • a new directory, "music", should contain all files with ".mp3" and ".flac" extensions;
  • a new directory, "images", should contain all files with ".jpg" and ".png" extensions;
  • a new directory, "videos", should contain all files with ".avi" and ".mov" extensions;
  • all files with the ".log" extension should removed;
  • other files not already mentioned in this list must hot be changed.

Task 4 -

Consider N coins aligned in a row. Each coin in showing either heads or tails. The adjacency of these coins is the number of pair of adjacent coins showing the same face.

You are given an implementation of a function:

class solution { public int solution(int[] A); }

that, given a non-empty array A consisting of N integers representing the coins, returns the maximum possible adjacency that can be obtained by reversing exactly one coin (that is, one of the coins must be reversed). Consecutive elements of array A represent consecutive coins in the row. Array A contains only 0S and/or 1s:

  • 0 represents a coin with heads facing up;
  • 1 represents a coin with tails facing up.

Attachment:- Assignment File - Tasks.rar

Reference no: EM132369349

Questions Cloud

Describe each ethical point in the code of ethics : Describe each ethical point in the Code of Ethics. You may use a free screen capture site such as Screencast-O-Matic to record a video of your presentation.
What is the social influence model and how is it implemented : What is the Social Influence Model and how is it implemented? What are the nine components of the Treatment system? Please explain each component.
Discuss four areas affected by the unexpected events : Discuss four areas affected by these unexpected events. Three of the areas of the project affected by the events should include changes to budget.
Examine the activities and roles of project integration : Examine the activities and roles of project integration, time, cost, quality, and resource management when managing projects within organizations.
Write an SQL query that returns a list of invoices : Write an SQL query that returns a list of invoices (inv_num) with the total price of each (sum). The list should be ordered by inv_num (in descending order)
Describe how the tor network provides anonymity : Describe how the TOR network provides anonymity and how this can be used for both positive and negative purposes. In your description, come to a conclusion as
What were the main arguments pro-slavery southerners used : What were the main arguments pro-slavery southerners used to defend the institution of slavery against accusations that slavery was barbaric and backward?
Complete the weight and body composition self-check : Complete the Weight and Body Composition self-check, which covers the material in these chapters as well as the health conditions.
Discuss about the job tasks of operational security teams : How do the job tasks of operational security teams differ from those of security engineering and cyber security? Want one page answer, you must include.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Generate mathematical problems based on the difficulty level

Generate mathematical problems based on the difficulty level selected. You must implement the following five levels of difficulty

  Program that implements the described behavior

The railway network is defined by pairs of stations and distance between each pair - Program reads configurations files, check for configuration errors

  Write a recursive function that takes a string

Write a recursive function that takes a string as a parameter and prints its reversal in the same function in C++

  Questions of mcqs in c programming

The quality of a language that allows a programmer to express a computation clearly, correctly, concisely, and quickly is called _____.

  Difference between the effects of the given two declarations

What is the difference between the effects of the following two declarations: Ratio y(x); Ratio y = x; What is the difference between the effects of the following two lines: Ratio y = x; Ratio y; y = x;

  Design a class that has a static method named writearray

Design a class that has a static method named writeArray.  THe method should take two arguments: the name of a file and a reference to an int array.

  C program that allows user to make some banking transactions

Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents, not less than zero).

  Test all the memeber function and overloaded operators

Write a program to test all the memeber function and overloaded operators in your class definition.

  Create a text adventure game that uses pointers you have a

create a text adventure game that uses pointers. you have a rich eccentric uncle billy who is soon to be deceased.he

  Design a modularized body mass index (bmi) program

Make sure to use meaningful variable names and thoroughly comment your code where appropriate.

  How many times is the copy constructor called

In the subsequent code how many times is the copy constructor called in the given code?

  Create and implement a binary search algorithm

Create and implement Insertion sort algorithm which will sort the array before the Binary Search algorithm is executed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd