99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

NFO20003代做、代寫(xiě)SQL編程語(yǔ)言
NFO20003代做、代寫(xiě)SQL編程語(yǔ)言

時(shí)間:2025-04-30  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



NFO20003 Semester 1, 2025

Assignment 2: SQL

Due: 11:59pm Friday, 2 May, 2025

Weighting: 10% of your total assessment

EV-XYZ: Electric vehicle and charger database

Description

EV-XYZ is a platform you’re creating to help keep track of its electric vehicles, charging stations, and

charging activities.

An electric vehicle (EV) charging station provides charging facilities with different charging rates and

costs to the electric vehicles. The charging stations can also be associated with other facilities like cafés

and restaurants.

Charging station

For each charging station, the system records its details, that are – the address of the charging station

(as street address, suburb, state, postcode), and the establishment date. Each charging station is also

associated with at least one ‘company’ that owns that charging station. A charging station can be jointly

owned by multiple companies.

Each charging station has at least one charging ‘outlet’ where electric vehicles can plug-in for charging.

An outlet of a charging station can be uniquely identified with the charging station’s ID and the outlet’s

ID, as ‘charging station ID X, outlet ID Y’.

Each outlet has a charging rate in kW (e.g. 120), and the

charging cost per kwh is also recorded (in $/kWh, e.g. 0.25 $/kWh). Different outlets of the same

charging station can have different charging costs.

The system also stores information about ‘facilities’ (e.g., a café or restaurant), if they are associated

with a charging station.

A facility can provide discount coupons, which can be used for discounted rates

of a ‘charging event’. For each coupon, the system stores some values of the coupon, which are – the

unique coupon ID, and discount value. A coupon can only be issued by one facility and used in at most

one charging event.

Electric vehicle (EV) + People

Each electric vehicle is associated with a unique vehicle identification number (VIN), manufacturer

company, model name, year, capacity of the battery (in kWh, e.g. 60kWh). For each manufacturer

company - the name of the company, a unique ABN number, and the current CEO’s name are stored.

Sometimes an EV company is owned by a parent EV company, which the model also stores.

Each electric vehicle is registered to one person. For each person, the system stores that person’s

(unique) driving license number, and their name. One person can have multiple electric vehicles

registered with them.

Charging event

The system maintains the information of all charging events – that is, which electric vehicle is charged

at which outlet of a charging station. When a person wants to charge a car, they request to charge at a

particular charging station. The person who charges the car may not necessarily be the car’s registered

owner, so we record the license number of the person who is charging. Once an outlet is available, the

system will assign an outlet to the person, and they may use it to start charging. The kWh a charge event

consumed is also recorded after charging is completed.

A charging event may or may not use a discount coupon, where the coupon can only be from one of the

facilities. A discount coupon represents a ‘percentage discount’ (e.g. a value of 0.5 indicates a 50%

discount).

Data Model

Figure 1: The physical ER model of EV-XYZ

Assignment 2 Setup

A dataset is provided which you can use when developing your solutions. To set up the dataset,

download the file ev_2025.sql from the Assignment link on Canvas and run it in Workbench. This script

creates the database tables and populates them with data. Note that this dataset is provided for you to

experiment with, but it is not the same dataset as what your queries will be tested against (the schema

will stay the same, but the data itself may be different). This means when designing your queries you

must consider edge cases even if they are not represented in this particular data set, and should not

hardcode information like IDs into your queries.

The script is designed to run against your account on the Engineering IT server

(info20003db.eng.unimelb.edu.au). If you want to install the schema on your own MySQL Server

installation, uncomment the lines at the beginning of the script.

? Do NOT disable only_full_group_by mode when completing this assignment. This mode is the

default, and is turned on in all default installs of MySQL workbench. You can check whether it is turned

on by running the query `SELECT @@sql_mode;`. The command should return a string containing

“ONLY_FULL_GROUP_BY” or “ANSI”.

When testing, our test server WILL have this mode turned

on, and if your query fails due to this, you will lose marks.

The SQL tasks

In this section are listed 10 questions for you to answer. Write one (single) SQL statement per question.

Subqueries and nesting are allowed within a single SQL statement

? In general, we care more about correctness than constructing the ‘most efficient’ query

(computationally, or in terms of number of characters/lines). However, you may be penalized for

writing overly complicated SQL statements (e.g the query is 2-3x longer than required, using

superfluous joins, etc), using very poor formatting, using very poor alias naming, or other decisions that

make it hard for us to read/understand what you’re trying to do when marking!

? DO NOT USE VIEWS (or ‘WITH’ statements/common table expressions) to answer questions.

1. Find the model name and model year of the vehicle with the highest battery capacity. If there

are ties, return a row for each of those model name and year with equal highest capacity. Your

query should return results of the form (model_name, model_year, battery_capacity). (1 mark)

2. Find all the charging stations with at least one outlet of 100 or higher charging rate. Do not

repeat the same station multiple times in the result if it has multiple outlets which meet the

criteria. Your query should return results of the form (station_id, state, postcode). (1 mark)

3. Find all the charging stations that do not have any facility associated with them. Your query

should return results of the form (station_id). (1 mark)

4. Find all the people who have electric vehicles registered in their name, where that vehicle has

no charging event in the database. Only include people with at least one car registered to them

that meets this criteria. Your query should return (license_number, name, total_num_of_cars_

with_no_charge_event_registered_to_person), ordered by name in increasing order. (2 marks)

5. Find all facilities that have ever issued a coupon, but had no coupons redeemed on “2025-01- 01” (i.e., no charging event requested charging using that coupon on that day). Your query

should return all such facilities in the form (facility_id). (2 marks)

6. Find all vehicle models and model years that, on average, charge more than 50kWh when they

charge at outlets with a charging rate > 68 kW. If a charging event has NULL for kWh value,

it should not be considered in the average. The average_kwh must be rounded to two decimal

places (hint: use the `Round` function). Return results as (model_name, model_year,

company_name, rounded_average_kwh). (2 marks).

7. Find the total number of vehicles manufactured by the company with an ABN of ‘1’, or any of

that company’s child or grandchild companies. Your query should return a single value of the

form (total_number_manufactured) (2 marks).

Further clarification for Q7:

If a company X is owned by company Y, then X is the child company of Y. If company Y is

owned by company Z, then X is the grandchild company of Z. You may assume there are no

‘great-grandchild’ companies (see example below). You may also assume that there are no

circular relationships, e.g., if X is a child or grandchild of Y, then Y cannot be a child or

grandchild of X.

For example, suppose that the `Company` table looked like the following:

abn company_name parent_abn *Note*

“1” “General Motors LLC” NULL

“2” “GMC” “1” ‘child’ company of “1”

“3” “Hummer, Inc” “2” ‘grandchild’ company of “1”

Since the company with abn “2” is a child of (owned by) company “1”, and company “3” is a

child of company “2”, answering this question would involve finding the total number of cars

manufactured by companies “1”, “2” and “3”. There will never be a company which has a

parent_abn of “3”, since that would then be a “great-grandchild company”.

8. Find all vehicles that have only ever been charged by people who are NOT the registered owner

of the vehicle. Only include vehicles in the result that have been in at least one charging event.

Return results as (VIN). Charging events with NULL kWh should still be considered. (3 marks)

9. Find all (person, car) pairings where the person has charged that car at every outlet of every

station that is both located in a postcode between 3000 and 4000 (including 3000 but not 4000)

and owned by the manufacturer of the car. Return results as (license_number, VIN). Only

consider stations owned by the company directly, not by child companies. Charging events with

NULL kWh should still be considered. (3 marks)

Further clarification for Q9:

- If a carY has been charged at all outlets matching the criteria by personX, and additionally has

been charged at all outlets matching the criteria by personW, the results would include rows

(license_number_personX, vin_carY) and (license_number_personW, vin_carY).

- A row in the output of the query indicates that the same person charged the same car at all

outlets that match the criteria for that car. Say there exists a carY, and station1 and station2 are

the only two stations that fulfil the criteria for carY (have a postcode of 3xxx, and are owned

by the manufacturer of carY). Say there exists a personA who has charged carY at every outlet

of station1 but never charged at any outlet of station2. A different personB also exists, who has

charged the same carY at every outlet of station2 but never at any outlet of station1. In this

instance, no rows should be returned as result, because no single person charged carY at every

outlet matching the given criteria (even though the car was charged at every outlet by

somebody).

10. What was the total income of outlet `2` of the charging station located at street address `125

Collins Street` in postcode `3000` in January 2025? Use the `requested_at` date to determine

whether a charging event was on that date. Your query should return a single value of the form

(total_income), rounded to two decimal places (hint: use the `Round` function, and round

after performing any aggregations). Note that you should consider the income after applying

any discounts (see hint below). (3 marks)

Hint: The income generated from a single charging event E at an outlet O which used coupon

C for a discount can be calculated as:

E.kwh x O.price_kwh x C.discount

SQL Response Formatting Requirements

To help us mark your assignment queries as quickly/accurately as possible, please ensure that:

1. Your query returns the projected attributes in the same order as given in the question, and

does not include additional columns.

E.g., if the question asks ‘return as (userId, name)’, then:

? DO: “SELECT userId, name …”

? ? DON’T: “SELECT name, userId…”

You can, however, rename/name the columns to whatever you’d like using `AS`, only the order

matters.

2. Do NOT use “databaseName.tableName” format.

E.g.:

? DO: “SELECT userId FROM users…”

? ? DON’T: “SELECT userId FROM coltonc.users …”.

Note that you can use tableName.columnName format, like researchers.email.

3. Ensure that you are using single quotes( ‘ ) for strings

Double quotes should only be used for table names (but you shouldn’t need to do this since we don’t

have spaces in our table names)

E.g.:

? DO: …WHERE name = ‘bob’

? ?DON’T: …WHERE name = “bob”…

4. Do NOT delete the special comment markers in the SQL template file.

These include (where X is the question number):

-- BEGIN QX

-- END QX

-- END OF ASSIGNMENT

These help us mark your assignment!

5. Comments are optional, but will help tutors to understand your code!

Submission Instructions

Your submission will be in the form of an SQL script. There is a template file on the LMS, into which

you will paste your solutions and fill in your student details (more information below).

This .sql file should be submitted on Canvas by 6pm on the due date of Friday 2nd May. Name your

submission as 987654.sql, where 987654 corresponds to YOUR student id.

Filling in the template file:

The template file on the LMS has spaces for you to fill in your student details and your answers to the

questions. There is also an example prefilled script available on the LMS as well. Below are screenshots

from those two documents explaining the steps you need to take to submit your solutions:

Step Example

1. At the top of the

template, you’ll need to

replace “XXXXXXXX”

with your student

number and name

Template

Example Filled in

2. For each question 1- 10, place your SQL

solution in between the

“BEGIN QX” and

“END QX” markers.

Ensure each query is

terminated with a

semicolon “;”

Template

Example Filled in

3. Test that your script is

valid SQL by running it

from MySQL

Workbench. Run the

entire script by copy- pasting this entire file

into a new workbench

tab, placing your cursor

at the start of the file

(without selecting

anything), and pressing

the lightning bolt to run

the entire file.

All queries should run

successfully one after

another. If not, check to

make sure you added

semicolons ‘;’ after each

query.

All 10 queries ran sequentially and were successful.

Late submission

Unless you have an approved extension (see below), you will be penalised -10% of the total number of

marks in the assignment per day day (including weekdays and weekends) that your submission is late.

For instance, if you received a 78% raw score, but submitted 2 days late, you'd receive a 58% score for

the assignment.

Requesting a Submission Deadline Extension

If you need an extension due to a valid (medical) reason, you need to follow the procedure described in

FEIT Extensions and Special consideration page:

https://canvas.lms.unimelb.edu.au/courses/210122/pages/feit-extensions-and-special- consideration?module_item_id=6469145.

Reminder: INFO20003 Hurdle Requirements

To pass INFO20003, you must pass two hurdles:

 Hurdle 1: Obtain at least 50% (15/30) for the three assignments (each worth 10%)
 Hurdle 2: Obtain at least 50% (35/70) for the combination of the quizzes and final exam

Therefore, it is our recommendation that you attempt every assignment and question in the exam.

GOOD LUCK!

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:被易分期強(qiáng)制下款怎么辦?如何聯(lián)系易分期客服解決問(wèn)題?
  • 下一篇:FINC5090代寫(xiě)、代做Java/Python程序
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷(xiāo)助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷(xiāo)助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶(hù)要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線(xiàn)
    合肥機(jī)場(chǎng)巴士4號(hào)線(xiàn)
    合肥機(jī)場(chǎng)巴士3號(hào)線(xiàn)
    合肥機(jī)場(chǎng)巴士3號(hào)線(xiàn)
  • 短信驗(yàn)證碼 trae 豆包網(wǎng)頁(yè)版入口 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                欧美性感一区二区三区| 久久久无码精品亚洲日韩按摩| heyzo一本久久综合| 欧美性一区二区| 国产日韩v精品一区二区| 一二三四社区欧美黄| 国产一区二区三区美女| 91福利国产精品| 欧美激情一区二区三区不卡| 亚洲成人动漫精品| 99久久精品费精品国产一区二区| 欧美久久高跟鞋激| 亚洲女人的天堂| 国产成人精品一区二区三区四区| 91福利精品视频| 国产精品久久国产精麻豆99网站| 免费三级欧美电影| 欧美三级视频在线观看| 中文字幕一区视频| 国产精品一区二区无线| 日韩西西人体444www| 亚洲综合色在线| 91麻豆免费看| 中文字幕一区在线| 99久久精品免费看| 中文字幕一区在线| av中文字幕一区| 中文字幕欧美国产| 国产91丝袜在线播放九色| 日韩免费观看高清完整版| 免费人成网站在线观看欧美高清| 在线观看91精品国产麻豆| 石原莉奈在线亚洲三区| 欧美老肥妇做.爰bbww视频| 亚洲女人****多毛耸耸8| 国产乱码精品一区二区三| 91久久精品午夜一区二区| 婷婷成人激情在线网| 国产成人在线网站| 老司机免费视频一区二区三区| 色婷婷综合中文久久一本| 中文字幕在线播放不卡一区| 成人午夜av电影| 欧美国产精品一区二区三区| 福利电影一区二区| 中文字幕在线不卡一区二区三区| a级精品国产片在线观看| 国产精品全国免费观看高清| 99久久久久久| 亚洲成人av一区| 欧美成人精品1314www| 另类人妖一区二区av| xnxx国产精品| 99久久免费国产| 亚洲一区二区三区中文字幕| 欧美成va人片在线观看| 精品国产髙清在线看国产毛片| 久久精品国产99久久6| 久久久久久9999| 91色视频在线| 午夜电影一区二区| 欧美电影免费观看高清完整版| 国产一区二区三区精品视频| 欧美激情综合五月色丁香小说| 99久久99精品久久久久久| 亚洲成人在线免费| 26uuu色噜噜精品一区二区| 不卡的av在线| 日韩成人一级大片| 国产精品久久精品日日| 欧美福利视频一区| 国产精品亚洲人在线观看| 亚洲另类一区二区| 精品乱码亚洲一区二区不卡| 91美女在线看| 久久黄色级2电影| 自拍偷拍亚洲综合| 日韩一区二区免费在线观看| 蜜臀va亚洲va欧美va天堂| 国产精品天天看| 欧美一区二区三区在线观看视频| 国产91在线|亚洲| 日韩黄色一级片| 亚洲国产成人私人影院tom| 欧美伦理电影网| 97se狠狠狠综合亚洲狠狠| 免费成人在线网站| 一区二区三区精品在线观看| 久久久午夜精品| 欧美久久久久久久久中文字幕| 国产不卡免费视频| 久久精品国产99国产| 亚洲乱码国产乱码精品精小说 | 一区二区三区国产豹纹内裤在线| 日韩一区和二区| 91啦中文在线观看| 国产黄色成人av| 麻豆91在线看| 天天av天天翘天天综合网| 中文字幕亚洲欧美在线不卡| 亚洲精品在线电影| 欧美一区二区日韩一区二区| 91国模大尺度私拍在线视频| 国产精品中文字幕日韩精品| 奇米精品一区二区三区在线观看 | 国产在线精品国自产拍免费| 亚洲一区免费在线观看| 国产精品免费丝袜| 久久久噜噜噜久噜久久综合| 欧美一区二区三区视频免费 | 偷窥少妇高潮呻吟av久久免费| caoporn国产精品| 天天av天天翘天天综合网色鬼国产 | a级高清视频欧美日韩| 婷婷开心激情综合| 国产女同性恋一区二区| 久久精品国产亚洲5555| caoporen国产精品视频| 国产精品午夜电影| 久久人人超碰精品| 91精品国产91久久综合桃花| 欧美丝袜丝交足nylons| 色综合久久66| 97久久超碰国产精品| 欧美一区二区三区视频在线| 亚洲激情欧美激情| 中文字幕一区二区三区视频| 国产午夜精品久久久久久免费视| 69堂成人精品免费视频| 91精品免费在线观看| 欧美久久久久久蜜桃| 欧美日韩亚洲国产综合| 欧美日韩一区精品| 欧美一区二区播放| 日韩三级伦理片妻子的秘密按摩| 日韩一区二区在线免费观看| 欧美成人精品福利| 国产清纯白嫩初高生在线观看91 | 国产欧美一区二区三区鸳鸯浴| 欧美一级片在线看| 日韩一区二区影院| 欧美一区二区性放荡片| 91亚洲永久精品| 国产一区二区三区黄视频 | 日韩av电影免费观看高清完整版| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲婷婷综合色高清在线| 亚洲欧美一区二区三区久本道91 | 欧美日韩激情一区二区三区| 欧美精品色综合| 精品裸体舞一区二区三区| 中文字幕欧美国产| 一区二区三区四区在线| 日韩精品一二三区| 国产高清精品久久久久| 91视频免费看| 欧美一卡二卡在线观看| 亚洲国产高清在线| 午夜视频在线观看一区二区三区| 日韩中文字幕麻豆| 成人免费毛片嘿嘿连载视频| 色综合久久久久久久| 国产一二精品视频| 99久久er热在这里只有精品15| 免费欧美日韩国产三级电影| 欧美在线观看一二区| 欧美日韩国产综合一区二区三区| 日韩欧美国产wwwww| 国产精品久久久久久久久免费桃花 | 日韩欧美激情在线| 亚洲美女电影在线| 激情文学综合网| 欧美三级中文字| 亚洲欧美综合网| 国产在线播放一区| 制服丝袜亚洲播放| 亚洲一区二区三区四区在线观看 | 欧美一区二区视频网站| 亚洲视频在线观看三级| 国产一区二区三区精品视频| 777久久久精品| 一区二区高清免费观看影视大全| 国产一区二区不卡| 欧美丰满少妇xxxbbb| 一卡二卡欧美日韩| 99re在线精品| 欧美激情一区二区三区蜜桃视频| 美女爽到高潮91| 欧美高清精品3d| 一区二区三区欧美激情| 国产91在线|亚洲| 久久综合九色欧美综合狠狠| 日韩二区三区四区| 欧美日韩一级二级三级| 亚洲视频一区二区在线| 成人性色生活片| 国产欧美日韩综合| 国产电影一区二区三区| 久久综合久久综合亚洲| 久久99久久精品欧美|