- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这两个问题都将根据此表计算:
CREATE TABLE WINE
(
wineID INT,
wineName VARCHAR(50),
wineYear CHAR(4),
winePrice DECIMAL(5,2),
wineDesc VARCHAR(255),
wineHarvest DATE,
wineAlcohol DECIMAL(5,2),
wineSugar_gl DECIMAL(5,2),
wineAcidity_gl DECIMAL(3,2),
winePHLevel DECIMAL(3,2),
wineIsMaloLactic BIT,
wineCaseProduction SMALLINT,
CONSTRAINT pk_wine_wineID PRIMARY KEY(wineID)
);
/*22 New Wine Records*/
INSERT INTO WINE VALUES(1,'Dean''s List Chardonnay','2007', 27.95, 'This Chardonnay provides enticing aromas of apricots, vanilla bean and butterscotch. A medium bodied Chardonnay, with a silky mouth texture, and nice acidity for balance. Flavours of caramel, peach and candied lemon dominate the palate', '2007-09-20',13.0, 3.1, 5.6, 3.4, 0, 200);
INSERT INTO WINE VALUES(2,'Barrel Fermented Chardonnay','2008', 18.95, 'This Chardonnay provides tantalizing aromas of caramel, vanilla bean and peach pie. This full-bodied wine has a silky mouth texture, offering characteristics of butterscotch and baked apples on the palate, leading to a long and lingering finish.', '2008-10-13',13.5, 3, 6, 3.46, 0, 320);
INSERT INTO WINE VALUES(3,'Unoaked Chardonnay','2009', 14.95, 'With lively aromas of citrus and melon, this refreshing Chardonnay offers flavours of lemon and green apple on the palate', '2009-10-29',13.0, 6, 7, 3.3, 1, 190);
INSERT INTO WINE VALUES(4,'Gewurztraminer','2009', 14.95, 'This is a highly aromatic Gewurztraminer, offering aromas of lychee, rose petals and citrus fruit. On the palate,this wine has lively acidity, with flavours of grapefruit and orange marmalade', '2009-10-14',12.0, 5, 7.2, 3.2, 1, 293);
INSERT INTO WINE VALUES(5,'Sauvignon Blanc','2008', 14.95, 'Our 2008 Sauvignon Blanc is highly aromatic providing aromas of citrus and fresh cut grass. This wine is nicely balanced, with refreshing acidity and offers flavours of citrus fruit and green fig on the palate', '2008-09-29',12.0, 4, 6.9, 3.4, 1, 270);
INSERT INTO WINE VALUES(6,'Riesling ','2008', 13.95, 'Our 2008 Riesling offers aromas of lemon and lime on the nose, followed by flavours of green apple and citrus fruit on the palate. This is a nicely balanced wine offering crisp acidity, and a lovely finish', '2008-10-08',11.5, 9, 6.8, 3.2, 1, 420);
INSERT INTO WINE VALUES(7,'Riesling Semi-Dry','2009', 13.95, 'Our 2009 Riesling offers aromas of citrus fruit and peach on the nose, followed by flavours of green apple and citrus fruit on the palate. A nicely balanced wine with crisp acidity, and a hint of sweetness', '2009-10-30',12.0, 18, 8.5, 3, 1, 227);
INSERT INTO WINE VALUES(8,'College White','2008', 10.95, 'A Chardonnay/Vidal blend offering aromas of peach and orange blossoms. This wine is nicely balanced, with mild acidity and offers flavours of tropical fruit on the palate', '2008-09-20',12.0, 5.9, 6.2, 3.3, 1, 250);
INSERT INTO WINE VALUES(9,'Dean''s List Prodigy Icewine','2009', 37.95, 'This Vidal/Chardonnay/Riesling blend has a very expressive nose, with aromas of candied lemon and tropical fruit. Flavours of mango and honey coat the palate, with a perfect balance between acidity and sweetness', '2010-01-29',11.0, 211, 8.6, 3.4, 1, 96);
INSERT INTO WINE VALUES(10,'Dean''s List Savant Icewine','2008', 69.95, 'This Icewine offers aromas of strawberry jam, and rhubarb on the nose, with similar flavours on the palate. This wine has a beautiful mouth texture, with a perfect balance between sweetness and acidity', '2009-01-21',12.0, 225, 3.4, 8.8, 1, 61);
INSERT INTO WINE VALUES(11,'Dean''s List Cabernet Franc Icewine','2009', 29.95, 'This Cabernet Franc Icewine offers aromas of strawberry, honey and rhubarb on the nose, with similar flavours on the palate. This wine has a beautiful mouth texture, with a perfect balance between sweetness and acidity', '2010-01-29',11.0, 210, 8.4, 3.4, 1, 472);
INSERT INTO WINE VALUES(12,'Dean''s List Meritage','2007', 47.95, 'This complex Meritage offers black currants, plum and cedar on the nose, with flavours of cassis, dark chocolate and blackberry. Full bodied, with firm yet ripe tannins, and a long and lingering finish', '2006-10-01',13.0, 2.8, 6, 3.51, 0, 250);
INSERT INTO WINE VALUES(13,'Dean''s List Pinot Noir Canadian Oak Project','2007', 38.95, 'This limited edition Pinot offers aromas of ripe strawberries, cigar and mocha. This medium bodied red provides firm, yet ripe tannins and flavours of black cherry and vanilla bean', '2007-10-10',13.0, 3, 5.8, 3.5, 0, 61);
INSERT INTO WINE VALUES(14,'Meritage ','2005', 37.95, 'This powerhouse Meritage offers jammy black fruit, cassis and eucalyptus on the nose, with similar flavours on the palate. Full-bodied, with firm yet ripe tannins and a beautifully long finish', '2004-10-01',13.0, 2.8, 7.5, 3.51, 0, 275);
INSERT INTO WINE VALUES(15,'Dean''s List Pinot Noir','2007', 32.95, 'With aromas of beet root, earth and sour cherry, this Pinot offers raspberry and vanilla bean on the palate. A medium bodied Pinot with firm, yet ripe tannins leading to a long finish', '2007-10-10',13.5, 4, 5.8, 3.5, 0, 350);
INSERT INTO WINE VALUES(16,'Shiraz','2006', 18.95, 'With aromas of cracked black pepper, and red fruit, this Shiraz offers flavours of raspberry, plum and spice. Medium bodied with smooth tannins, and a long and lingering finish', '2005-10-25',13.0, 2.3, 6.6, 3.25, 0, 275);
INSERT INTO WINE VALUES(17,'Cabernet Franc','2007', 18.95, 'This is a very rich Cabernet Franc with an expressive nose of blackberry jam and crème de cassis. Flavours of black fruit, baking spice and black licorice coat the palate, with a pleasant balance between fruit, tannin, acidity and alcohol. Lovely finish', '2007-10-25',13.0, 4, 6.5, 3.63, 0, 458);
INSERT INTO WINE VALUES(18,'Pinot Noir','2008', 15.95, 'This Pinot provides aromas of black cherry and earth, followed by flavours of sour cherry and vanilla. Light-medium bodied Pinot with smooth tannins, and a lingering finish', '2008-10-07',13.0, 4.5, 6.2, 3.8, 0, 410);
INSERT INTO WINE VALUES(19,'Merlot','2006', 15.95, 'With aromas of plum, and black cherries, this Merlot offers firm yet ripe tannins and flavours of black berries and currants. Nice finish', '2006-10-24',13.0, 4.4, 6.5, 3.51, 0, 370);
INSERT INTO WINE VALUES(20,'Cabernet Sauvignon','2006', 15.95, 'With a nose of black fruits and spice, this Cabernet Sauvignon offers flavours of cassis and anise on the palate', '2006-10-29',13.0, 5, 6.7, 3.5, 0, 270);
INSERT INTO WINE VALUES(21,'Baco Noir','2006', 11.95, 'Little known in the rest of the world, Baco is a signature hybrid for Ontario. This Baco Noir offers aromas of raisin, vanilla and black cherry, with similar flavours on the palate', '2006-09-01',11.5, 5.5, 9.1, 3.32, 0, 140);
INSERT INTO WINE VALUES(22,'College Red','2008', 10.95, 'This Cabernet Franc/Baco Noir blend offers aromas of jammy fruit, mocha and sweet bell pepper, with similar flavours on the palate. An easy drinking red wine with soft tannins and a pleasant finish', '2008-09-23',12, 3, 7, 3.6, 0, 590);
1.我们收获 2009 年的冰酒已经多少天了?
SELECT wineName
,DATEDIFF(DAY, wineHarvest, GETDATE()) AS '# of
Days Since Harvest'
FROM WINE
WHERE wineName LIKE '%Icewine'
AND YEAR(wineYear) = '2009';
这是我的教授告诉我的“看一下 wineYear 列的数据类型,然后问问自己 YEAR () 函数的用途,然后再试一次。你已经非常接近了。”但我只是不知道..
2.含糖量/gl最高的酒的名称、价格、酒精度是多少?
SELECT MAX(wineSugar_gl) AS wineName
,winePrice
,wineAlcohol
FROM WINE;
虽然对于这一个,我遇到了一个错误,但我不知道如何修复它。我需要它来显示含糖量最高的 Wine 的名称价格和酒精度百分比。
它们看起来像这样:
最佳答案
YEAR 函数用于解析时间、日期、smalldatetime、datetime、datetime2 或 datetimeoffset 值中的年份。实际上,您不需要在查询中使用它,因为已经有一个列可以显示每种 Wine 的年份。
SELECT wineName
,DATEDIFF(DAY, wineHarvest, GETDATE()) AS '# of
收获后的天数
来自 Wine
WHERE wineName LIKE '%Icewine'
AND wineYear = '2009';
您当前的查询正在运行聚合函数 (MAX()
) - 这里不需要。聚合函数用于累积多行的值。但是,你的值(value)已经摆在桌面上了!您可以执行以下操作:
选择前 1
wineSugar_gl
,酒价
,酒类
来自 Wine
按 wineSugar_gl DESC 排序;
关于SQL 服务器 : 2 questions for homework can't figure it out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39668552/
Alexa 技能适用于第一个问题,但不适用于第二个问题。这是一个使用以下数组的困惑字母测验 var arr = [{"Q":"dcha","A":"chad"},{"Q":"goto","A":"to
我正在制作一个小问答 ios 应用程序。我希望第一个问题是随机的。我的代码如下。 let allQuestions = QuestionBank() var pickedAnswer : Bool =
我对 Dialogflow 比较陌生,我正在尝试创建一个医疗保健诊断语音聊天机器人,其工作方式如下。 用户体验 用户调用系统并受到聊天机器人的欢迎。 聊天机器人开始询问与分流相关的问题(例如,“您有慢
我正在尝试将一个表单(包含测试问题)提交到一个名为 Questions 的 mongo 集合中。我已经引用了运行服务器端代码的文件,我认为它应该都可以正常工作。这是我的代码: //add.html
import 'dart:async'; import 'question.dart'; import 'package:http/http.dart' as http; import 'dart:c
我想添加用户输入到列表中的任何字符串 run :- write('How many students you have: '),read(x),nl. enterNameOfStuden
我正在努力提高我的 JAVA 水平。现在我有一个关于线程的问题我不明白。 我尝试的代码是这样的, public class MyThread implements Runnable { pri
我正在为一个项目构建一个 XML 反序列化器,我经常遇到这种类型的代码情况: var myVariable = ParseNDecimal(xml.Element("myElement")) == n
我有一个 JSF 页面,它将创建一个新的 Comment。我将该页面的托管 bean 设为 RequestScoped 托管 bean。 @ManagedBean(name="PostComment"
房间和应用程序之间存在一对一的关系,意味着应用程序必须占用一个房间。如果我想获取未被应用占用的房间,如何写sql查询 最佳答案 select * from room r where not exist
我有一个 css 布局,其中我有一个单页网站 问题是我不想要滚动条所以我确实隐藏了溢出并且它工作正常但是当有不同的屏幕分辨率时,所以底部的内容被切断有没有办法解决这个问题 我的意思是,当内容适合首页时
我做了一个简单的算法,用于将整数转换为二进制,并将二进制作为字符串返回。目前,这些位被添加到列表的前面。在每一步连接字符串而不是附加到列表会更有效(就时间或空间而言)吗?为什么/为什么不? def t
我经常听说 mongodb 可以在一个集合级别执行原子性。您知道为什么以及如何将其与分片联系起来吗? replication 和 replicasets 之间的唯一区别是两者都是主/从(主要/次要),
我有几个关于线程的问题。能否请您澄清一下。 假设进程有一个或多个线程。如果进程被抢占/挂起,线程是否也被抢占或线程是否继续运行? 当挂起的进程被重新调度时,进程线程是否也被调度了?如果进程有进程有多个
我最近接受了一次采访,他问我单例设计模式是如何实现的,我告诉他使用静态变量和静态方法我们可以实现单例设计模式。 他似乎对答案满意但我想知道 我们可以有多少种不同的方式实现单例设计模式在 Java 中?
我以前使用 has_and_belongs_to_many,并已转换为 has_many :through。下面是它如何查找可以有很多用户玩的游戏列表。有了这个,我可以做 game.users 和 u
这是我的代码的骨架: var myArray: (Array | null); if (cnd) { myArray = []; myArray?.push(elt); // Question
使用ORLite时放置sqlite_unicode设置的正确位置在哪里? 最佳答案 不幸的是,没有一个真正好的地方。请参阅bug #61191: Enable sqllite_unicode in t
我承认我已经有一段时间没有使用 Perl 了,但这让我很难过。 这是问题: #!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use DBI; pr
我有一个名为 Question 的模型。模型允许用户创建新问题。我正在尝试使用对象查询集填充多个表单。当我尝试使用查询集进行初始化时,会出现问题。我收到此错误 'Question' object i
我是一名优秀的程序员,十分优秀!