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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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