Sqlite代写、SQL执行语句代写

Sqlite代写、SQL执行语句代写
SQL Assignment 2 (20%)
Questions:
1. Produce a table showing the total books that are currently “CheckedOut” by every major. Show the
Major and “Total Books Checkedout” in the query result and sort the “Total Books Checkedout” in
descending order. Use only the MediaCode in the Where condition.
2. Produce a table showing the total books published by each author between 2000 and 2015. Show only
the rows if the total published books is greater or equal 3. Sort the authors in ascending order.
Assuming you do not know the MediaID but you know the MediaCode.
Author Total Books Published
3. Find the customers who have an item due on the 8th August 2015 and has not “checkedin” in the loan
table. Sort the Full Name in ascending order. Show only the date without the time. Do not use
strftime() in this question.
Full Name Title DueDate
4. The library would like to know the number of times a customer has an overdue fee and their total
overdue fee. Sort the output by the ‘Number of times overdue’ in descending order then by the ‘Total
overdue fee’ in descending order. Show only the total overdue fee greater or equal to $5 but less than
$100.
Full Name Number of Times
Overdue
Total Overdue Fee
5. (a) Find all the unique customer full name with at least one loan.
*Important*
(1) Use the join syntax below for questions that require an inner join. Other syntax will not
be accepted.
SELECT column-list
FROM table 1 JOIN table 2 ON joint-condition
Where conditions
(2) Use “=” sign, for example “percent_time =100” not “percent_time IS 100”.
(b) Use 5(a) as a subquery, find all INFO students who did not make any loan. Include both their Full
Name, CustomerID, and Major in your results.
CustomerID Full Name Major
{The format of full name should be “Last Name, First
Name”.}
INFO
6. (a) Find the total overdue fee for the customer "Barclay, Fletcher" without using ID in the query.
(b) How many distinct students (exclude "Barclay, Fletcher") with a single overdue fee greater than
half the total overdue fee of "Barclay, Fletcher"? You must use 6(a) as a subquery. You must use
the “NOT” SQL in this question.
7. The manager is interested to know yearly borrowing volume by Gender. Present a table displaying the
Gender, Year, Month and The Number of Loans. Sort the results in descending order by Gender,
ascending order by Year and ascending order by Month. Show only the rows if the number of loans is
less than 25.
Hint: (1) Use CheckedOut date to extract the year and month when the book is loaned; (2) Use
strftime() function to deal with the year and month.
Gender Year Month The Number of Loans
M

F
8. (a) Find the total number of loan for each customerID.
(b) Show the total number of loan for each customer include customers who have no loan. You must
use 8(a) as sub-query to form the right part of the outer join table. Show the result according to the
format below.
CustomerID LastName FirstName Totalloan
9. Show the number of books published each year by each author. Show only the rows for author who
published more than 1 book in a year. The table should show author, Pubyear, and “Total Book
Published in Year”. MediaID should not be used in this query, use MediaCode.
10. Use only a left outer join to find the customers who did not make any loan. Show the CustomerID, Full
Name, and Major. Show only the rows contain “INFO” major only.
CustomerID Full Name Major
{The format of full name should be “Last Name, First
Name”.}
INFO
11. How many students with a total overdue fee greater than half the total overdue fee of "Barclay,
Fletcher" (exclude "Barclay, Fletcher")?
12. Use the SQL date modifier expression in chapter 44 of the Sqlite tutorial to add 3 days, 8 hours, 3
minutes, and 45 seconds to the date “2018-05-11 23:59:59”. This question does not require a
database.
http://www.daixie0.com/contents/15/1278.htm

本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,国内Top5硕士、博士生,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。

我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全  汇编语言 硬件编程 软件设计 工程标准规等。其中代写代做编程语言或工具包括但不限于以下范围:

C/C++/C#代写

Java代写

IT代写

Python代写

辅导编程作业

Matlab代写

Haskell代写

Processing代写

Linux环境搭建

Rust代写

Data Structure Assginment 数据结构代写

MIPS代写

Machine Learning 作业 代写

Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导

Web开发、网站开发、网站作业

ASP.NET网站开发

Finance Insurace Statistics统计、回归、迭代

Prolog代写

Computer Computational method代做

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]

微信:codinghelp

原文地址:https://www.cnblogs.com/helpcode/p/8933027.html

时间: 2024-11-05 16:02:49

Sqlite代写、SQL执行语句代写的相关文章

[Sqlite] 移动嵌入式数据库Sqlite的日常SQL操作语句汇总

序言:     嵌入式数据库Sqlite的基本sql使用汇总,使用测试起来,与关系型数据库mysql在语法上有很多的相似之处,先准备测试数据: CREATE TABLE COMPANY(ID INT NOT NULL, NAME VARCHAR(20),AGE INT,ADDRESS VARCHAR(20),SALARY DECIMAL(7,2)); INSERT INTO "COMPANY" VALUES(1,'Paul',32,'California',20000); INSERT

拼接SQL执行语句时,对单引号的处理

例: declare @SQL nvarchar(1000); declare @str nvarchar(100); set @str='Joe''s NB'; // 打印出来的应该是这样:Joe's NB set @SQL='select * from table where t1=''' + @str + ''''; print(@SQL); // 打印SQL语句看看是否正确 exec (@SQL); ============================================

Java解析property文件(和静哥说的,SQL执行限定时间写在xml中,增加扩展,在不改源代码基础上)

在Java项目中一些配置参数保存在Property文件中,这样能保证不修改原代码直接修改Property文件. PropertyParser.java package com.discover.parse; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; /** * @author Administrator * */ pub

一个表里有多个字段需要同时使用字典表进行关联显示,如何写sql查询语句

参考:https://bbs.csdn.net/topics/330032307 数据库里面有一个字典表,这张表里面有id段和对应的名字字段.在另外一个记录的表里面有对应的上述字典表的id,而且有多个字段都含有该id字段.需要将其查出来,并且用名字. SELECT a.id AS '编号', 'STORY' AS '类型' , a.title AS '标题',b.name AS '所属项目' ,a.project AS '所属项目' , c.realname AS '创建者', a.estima

获取分组后统计数量最多的纪录;limit用法;sql执行顺序

CREATE TABLE emp(id INT PRIMARY KEY,NAME VARCHAR(11),dep_id INT ,salary INT); CREATE TABLE dept(id INT PRIMARY KEY,NAME VARCHAR(11),parentid INT); 获取各部门人数信息: SELECT e.dep_id,d.name,COUNT(e.dep_id) FROM emp e,dept d WHERE e.dep_id=d.id GROUP BY e.dep_

代写存储过程、SQL函数语句

代写存储过程.SQL函数语句Each team is most likely to have the following tables in the existing model. Use the Excel data provided with this phase link: PATIENT (some teams called it EMPLOYEE or CUSTOMER) - If needed, alter your PATIENT table to include the fiel

sql语句代编写、sql 游标 、事务代写

sql语句代编写.sql 游标 .事务代写1. AimsThis project aims to give you practice in? reading and understanding a moderately large relational schema (MyMyUNSW)? implementing SQL queries and views to satisfy requests for information? implementing SQL functions to ai

代写SQL、数据库SQL代写、SQL代写、数据库SQL编程代写

代写SQL.数据库SQL代写.SQL代写.数据库SQL编程代写 我和我的小伙伴均毕业于国内外顶尖高校.就职于一线互联网企业,从事高级开发,熟悉MySQL.Oracle.SQL Server等一系列数据库的设计与开发 现接SQL代写业务(主要面向留学生)当然,我们更多接的是C.C++.Java.Python.Go编程代写? 声明 1.绝不抄袭,不坑学生是我们的底线 2.绝不使用太高级语法 3.无限期免费答疑.无限期修改直到您满意为止 联系方式 微信leechanx 或者直接扫码: 部分成交截图 原

代写程序作业、代写《大学计算机》课程报告作业

1 2 3 4 5A.(答案全面.准确,概念清楚,语言精炼流畅,文字通顺,观点有新意)B.(答案较全面,概念较清楚,文字通顺)C.(答案基本完整,概念基本清楚)D.(答案欠完整,有些概念不够清楚,达到最低要求)E.(不合格)分数(百分制): 评阅人:2018 年 05 月 07 日装订线第 1 题 任选一道实验 3 中的 Excel 操作题,描述操作过程(写清楚题目要求.分析思路.操作过程.遇到的问题及解决思路)第 2 题 根据课程学习,从下面两道题中选择一题并做出回答1)结合实例,对 SQL