text
stringlengths
6
9.38M
USE 'SeuBanco' SET @@auto_increment_increment=1; CREATE TABLE tblClientes( idCliente INT AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(30) NOT NULL, sobrenome VARCHAR(30) NOT NULL, idade INT NOT NULL, sexo CHAR(1) NOT NULL, estado CHAR(2) NULL ); INSERT INTO tblClientes(nome, sobrenome,idade,sexo,estado) VALUES ('João', '...
SELECT GROUP_CONCAT(p.ICD9_CODE), k.DIAGNOSIS, z.TEXT FROM mimiciiiv14.diagnoses_icd AS p, mimiciiiv14.admissions as k, mimiciiiv14.noteevents as z where p.HADM_ID=k.HADM_ID and p.SUBJECT_ID = k.SUBJECT_ID and p.HADM_ID =z.HADM_ID and p.SUBJECT_ID = z.SUBJECT_ID and k.HADM_ID =z.HADM_ID and k.SUBJECT_ID = z....
\encoding UTF8; SET client_min_messages TO WARNING; CREATE TABLE app.com_tipo_contatto ( id SERIAL NOT NULL PRIMARY KEY, descrizione VARCHAR(255) NOT NULL ); INSERT INTO app.com_tipo_contatto (id, descrizione) VALUES (1, 'Referente commerciale'); INSERT INTO app.com_tipo_contatto (id, descrizione) VALUES (2, 'Refe...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 12, 2013 at 10:30 PM -- Server version: 5.6.12-log -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
drop table if exists devices; create table devices ( id integer primary key autoincrement, serial_number text not null, asset_tag text, device_name text, dt_sub_to_jss DATETIME ); drop table if exists settings; create table settings ( id integer primary key autoincrement, setting_name text, setting_val...
INSERT INTO dogs (name, age, gender, breed, temperament, hungry) VALUES ("Snoopy", 3, "M", "beagle", "friendly", 1), ("McGruff", 10, "M", "bloodhound", "aware", 0), ("Scooby", 6, "M", "great dane", "hungry", 1), ("Little Ann", 5, "F", "coonhound", "loyal", 0), ("Pickles", 13, "F", "black lab", "mischievous", 1), ("Clif...
CREATE TABLE pedidos(código char(6) PRIMARY KEY, fecha char(10), importe number(6,2), cliente char(20), notas char(1024)); CREATE TABLE contiene(pedido char(6), plato char(20), ...
USE your_keyspace_name; drop table storm_data; drop table acs_data; drop table incidents; drop table policy_losses; drop table policy_info; drop table census_data;
-- phpMyAdmin SQL Dump -- version 4.3.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 06, 2015 at 12:02 PM -- Server version: 5.5.35-1ubuntu1 -- PHP Version: 5.5.9-1ubuntu4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
CREATE procedure sp_Chk_ODNumber_Duplicate(@Vendor_ID nvarchar(15),@ODNumber nVarChar(50),@Old_BillID Int = 0) As Begin Select Count(*) From BillAbstract Where IsNull(Status,0) & 128 = 0 And VendorID = @Vendor_ID And ODNumber = @ODNumber And BillID <> @Old_BillID End
create or replace view v1_jhdj_nzjy as select de011,de022,de042,jsde955,de186,de156,czde951,de084,jsde702,jsde802, hdde998,de200,hdde147,zbde151 ,zbjsde901,jsde821,czde183,jsde107,de194, czde202,sum(JHJE) as jhje,sum(JHSYJE) as jhsyje,sum(ZTSYJE) as ztssyje,sum(JHKYJE) as jhkyje,sum(kdjje) as kdjje from ( select de011,...
/* Drop Tables */ DROP TABLE T_SIIP_DRUGINSTORE CASCADE CONSTRAINTS; DROP TABLE T_SIIP_DRUGINSTOREDETAIL CASCADE CONSTRAINTS; DROP TABLE T_SIIP_DRUGOUTSTORE CASCADE CONSTRAINTS; DROP TABLE T_SIIP_DRUGOUTSTOREDETAIL CASCADE CONSTRAINTS; DROP TABLE T_SIIP_DRUGSTORAGESTOCK CASCADE CONSTRAINTS; DROP TABLE T_SIIP_INVDRUGS...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table auth_net_account ( id bigint auto_increment not null, name varchar(255) not null, description varchar(255), lo...
INSERT INTO public.restrictions (restriction_name) VALUES ('Reservation'), ('Owner Block');
CREATE Procedure sp_CheckPriceMatrixItemInCat(@categoryID Int=0,@ManuFacturerID INT=0) As Begin if @categoryID <> 0 Begin if @CategoryID In (Select CategoryID From Items I,PricingAbstract P Where I.Product_Code=P.ItemCode) select 1 else select 0 End if @ManuFacturerID <> 0 Begi...
-- @BeeOverwrite NO -- @BeeGenerateTime 20200831_224648 CREATE TABLE menu( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL, `app_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `path` varchar(255) NOT NULL, `pms_co...
CREATE TABLE students ( id int NOT NULL, name varchar(30) NOT NULL, surName varchar(50) NOT NULL, gender varchar(6) NOT NULL, age int NOT NULL, group_id int NOT NULL, PRIMARY KEY (id) ); CREATE TABLE groups ( id int NOT NULL, title varchar(50) NOT...
drop table USERDATA ;
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_SetGroupDocument]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[prc_CWI_SetGroupDocument] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_SetG...
CREATE PROCEDURE sproc_tblCustomer_FilterByCustomerNo @CustomerNo int AS SELECT * from tblCustomer where CustomerNo = @CustomerNo RETURN 0
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 19, 2018 at 06:00 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
# Write your MySQL query statement below select a.Name as 'Employee' from Employee a, Employee b where b.Id=a.ManagerId and a.Salary>b.Salary
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 12, 2015 at 04:43 PM -- Server version: 5.5.25 -- PHP Version: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 14, 2020 at 06:55 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
SELECT sff.ac_reg_no AS ac_reg, 'FLYING' AS flight_state, sff.fde_code AS fde_codes, sff.fault_code AS fault_codes, sff.ata AS ata, sff.message AS message, sff.lru AS lru, sffc.count AS occurrences, sff.reference_text AS r...
REM ------------------------------------------------------------------------ REM REQUIREMENTS: REM SELECT on V$ tables REM ------------------------------------------------------------------------ REM PURPOSE: REM Show waits statistics on buffer cache. REM free buffer inspected - # of buffers skipped, in order ...
--修改时间2012-12-10 --修改人 刘勇 --修改内容 20121130中原传媒付款单打回信息不显示日志也不显示问题 update bt_param set param_value1=trim(param_value1) where sys_code='nis' and code='budgetsel'; update bt_param set reverse1='0,不挂预算;1,挂预算' where sys_code='nis' and code='budgetsel'; commit;
INSERT INTO PRODUCT VALUES (1, 'Apple MacBook Pro MD101 Silver Notebook merupakan MacBook Pro berukuran 13.3 inch dengan resolusi 1280 x 800 piksel.', 'https://www.static-src.com/wcsstore/Indraprastha/images/catalog/full/apple_apple-macbook-pro-md101-silver_full04.jpg', 15000000.00, 'Garansi 1...
CREATE DATABASE art; USE art; CREATE TABLE people ( person_id SMALLINT UNSIGNED, first_name VARCHAR(45), last_name VARCHAR(45), PRIMARY KEY (person_id) ); INSERT INTO art.people (person_id, first_name, last_name) SELECT actor_id, first_name, last_name FROM sakila.actor;
SELECT pf.Id, pf.Name,CAST(pf.Size AS VARCHAR)+'KB' AS Size FROM Files pf LEFT JOIN Files f ON pf.Id=f.ParentId WHERE f.Id IS NULL ORDER BY pf.Id, pf.Name,pf.Size DESC
create database hab; use hab; create table location( id int primary key not null, name varchar(30) not null, create_location timestamp default current_timestamp, update_location timestamp default current_timestamp on update current_timestamp ); create table user( id int primary key auto_increment, n...
-- Your SQL goes here CREATE TABLE category_mappings ( category_mappings_id SERIAL, category_id INTEGER NOT NULL, correspondence_id INTEGER NOT NULL, opt_out VARCHAR(1) NOT NULL, retention_period INTEGER NOT NULL, PRIMARY KEY (category_mappings_id), ...
/* 基本函数*/ SELECT lower(ENAME) FROM EMP; /*转换为小写*/ SELECT ENAME FROM EMP WHERE lower(ENAME) LIKE '_a%'; SELECT ENAME FROM EMP WHERE ENAME LIKE '_a%' OR ENAME LIKE '_A%'; SELECT substr(ENAME, 2, 3) FROM EMP; SELECT chr(65) FROM dual; SELECT ascii('a') FROM dual; SELECT round(23.5) FROM dual; /*SELECT round(23,652,2)FROM ...
--We use the buffer pool extension to increase the efficiency of our database in collaboration with the ram. ALTER SERVER CONFIGURATION SET BUFFER POOL EXTENSION ON (FILENAME ='C:\TEMP\GVCache.bpe', SIZE = 12 GB); SELECT * FROM sys.dm_os_buffer_pool_extension_configuration; SELECT * FROM sys.dm_os_buffer_descriptor...
DROP TABLE IF EXISTS Owns CASCADE; CREATE TABLE Owns ( customer_id INTEGER NOT NULL REFERENCES Customers, credit_card_number CHAR(16) NOT NULL REFERENCES CreditCards, own_from_timestamp TIMESTAMP NOT NULL, PRIMARY KEY(customer_id, credit_card_number) ); DROP TABLE IF EXISTS Buys CASCADE; CREATE TABLE B...
CREATE TABLE publica_por_categoria( idCategoriaPublicacion int NOT NULL, cantidadVendidos int not null, idUsuario int not null, PRIMARY KEY (idCategoriaPublicacion, idUsuario), FOREIGN KEY (idCategoriaPublicacion) REFERENCES categoria(idCategoriaPublicacion), FOREIGN KEY (idUsuario) REFERENCES usuario(id...
-- block_decode.sql -- find object name for block -- useful with arg from ORA-1578 errors to find -- file and segment generating the error @clears col cfileid new_value ufileid noprint col cblockid new_value ublockid noprint prompt File ID: set term off feed off select '&1' cfileid from dual; set feed on term on...
USE hr_database; CREATE TABLE REGIONS( REGION_ID INTEGER NOT NULL, REGION_NAME VARCHAR(25) NULL, Constraint Regions_pk primary key (REGION_ID) ); CREATE TABLE Countries( Country_ID Char(2) Not NULL, Country_Name VarChar(40) Null, Region_ID Integer Not NULL, Constraint Countries_pk primary key (Country_ID, ...
;WITH [1] AS(SELECT [l].Id [1], [l].DisplayName [l] FROM Users [l] WHERE [l].DisplayName LIKE '%toole%') , [l] AS(SELECT [1].Id [1], [1].DisplayName [l] FROM Users [1] WHERE [1].DisplayName LIKE '%eric fr%') SELECT [1][0],[l][O] FROM [1] UNION SELECT [1],[l] FROM [l] ORDER BY 2,1
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 11-12-2017 a las 23:56:36 -- Versión del servidor: 10.1.22-MariaDB -- Versión de PHP: 7.1.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
#ABC reporting: Compute the revenue generated by each customer based on their orders. # Also, show each customer's revenue as a percentage of total revenue. # Sort by customer name. SELECT customerName, SUM(quantityOrdered*priceEach) As 'Revenue Generated', ROUND(100*(SUM(quantityOrdered*priceEach)) / ( ...
SELECT name , d_cr , user FROM fdviews WHERE (user = ? OR user = 0) AND id = ?
INSERT INTO longboards (name, type) VALUES ($1, $2) RETURNING *
INSERT INTO Apartment(apartmentId,name,type,dimensions,address,bankAccount,leaseStatus) VALUES(11098,'Vendi Place #1','Town House',1800,'Avenue F',11234567, 0), (11087,'Oasis #12','1 BHK Flat',1000,'2016 Charlotte street',23567453,0), (11097,'Vendi Place #2','Town House',1500,'Avenue F',11234567, 0), (11096,'Vendi Plac...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : lun. 13 juil. 2020 à 14:21 -- Version du serveur : 10.4.13-MariaDB -- Version de PHP : 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
--修改人:蒲勇军 --修改时间:2012-09-11 --修改内容:-付款参数表新增“预算科目”列 alter table bt_payment_param add item_code varchar2(100); --更新菜单路径 update bt_sys_res set res_name='付款方式参数' where sys_code='adm' and res_name='付款记账参数'; commit;
-- get the most massive z=0 haloes select * from MPAHaloTrees..MR where redshift between 0 and 0.01 and np between 100000 and 1000000000 order by np DESC -- find the progenitor tree of halo with haloid=x select PROG.* from MPAHaloTrees..MR PROG, MPAHaloTrees..MR DES where DES.TreeRootId = 140005829017979 and ...
-- MySQL dump 10.13 Distrib 5.1.49, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: op_world -- ------------------------------------------------------ -- Server version 5.1.49-1ubuntu8.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
/* Querying for the most popular games in the stream table */ SELECT game, count(*) FROM stream GROUP BY 1 ORDER BY 2 DESC; /* Leaugue of Legends is clearly the highest. Want to know where the streamers are located */ SELECT country, count(*) FROM stream WHERE game = 'League of Legends' GROUP BY 1 ORDER BY 2 DESC; ...
-- Добавляем записи INSERT INTO posts (title, description, body, category, verifed, factor) VALUES ('Путин вор!', 'Описание первой статьи', 'Текст нашей первой статьи', 'Новости', true, 3), ('Свободу Навальному!', 'Описание первой статьи', 'Текст нашей первой статьи', 'Новости', true, 6), ('Навальныому своб...
#run this to populate the columns in IKEA_group23_tables.sql INSERT INTO Seller VALUES('Muhammed Taha özturk', 2, 2635, '5/5', '+4595643789'); INSERT INTO Seller VALUES('Leurant Ameti', 2, 2620, '5/5', '+4567893212'); INSERT INTO Seller VALUES('Sohaib Tahir', 3, '2660', '1/5', '+4567327808'); INSERT INTO Seller VALUES...
CREATE DATABASE IF NOT EXISTS `laughable_lyrics`;
DROP TABLE YKT_CUR.T_TIF_REPORT_SHOP_BALANCE_01 CASCADE CONSTRAINTS; CREATE TABLE YKT_CUR.T_TIF_REPORT_SHOP_BALANCE_01 ( BALANCE_DATE VARCHAR2(10 BYTE) NOT NULL, SHOP_ID NUMBER NOT NULL, SHOP_NAME VARCHAR2(50 BYTE), DEPT_ID NUMBER, OPERATE_DATE ...
--Report that returns the students information according to Department No parameter create proc getStudentsByDep @dID int as select * from Student where Dept_Id = @dID getStudentsByDep 10 --Report that takes the student ID and returns the grades of the student in all courses. % create proc stdGrades @sID int as selec...
delimiter $$ drop procedure if exists adicionar_campo_referencia_atividade_pai $$ create procedure adicionar_campo_referencia_atividade_pai() begin if not exists ((select * from information_schema.columns where table_schema=database() and table_name='atividade' and column_name='atividade_pai'...
CREATE PROCEDURE Sp_SODetailSend_MUOM_Pidilite(@DOCTYPE as nvarchar(20),@CID as int) AS IF @DOCTYPE = N'SO' /* Store UOMDescription,UOM,UOMQty & UOMPrice values into Custom12,Custom13,Custom14 & Custom15 respectively */ SELECT "POId" = N'PO1', ...
SPOOL ON rem log file : USOL_Topic_Fix.log SPOOL USOL_Topic_Fix.log set echo on SET ESCAPE '\' delete from option_lookup where id = 97348010; update option_lookup set optvalue = 'Outcomes (disease \& pharmacoeconomics)' where optvalue in ('Outcomes (disease \& pharmaoeconomics', 'Outcomes (disease \& pharmaoeco...
drop schema if exists spring_security; create schema if not exists spring_security; use spring_security; create table if not exists users( username varchar(50) not null primary key, password varchar(100) not null, enabled boolean not null ); create table if not exists authorities ( username varchar(50) not null, ...
UPDATE streams SET version = ?, position = ? WHERE streams.id = ?
DROP TABLE IF EXISTS weapons; DROP TABLE IF EXISTS guests; DROP TABLE IF EXISTS rooms; CREATE TABLE rooms( id SERIAL PRIMARY KEY, name VARCHAR(255), capacity INT ); CREATE TABLE guests( id SERIAL PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), race VARCHAR(255), room_id INT REFERE...
create TABLE admin( admin_id varchar2(20) not null, password varchar2(20) not null, constraint admin_id_pk primary key (admin_id) ); create table users( user_no number not null, user_id varchar2(20) not null, password varchar2(20) not null, nickname varchar2(20) not null, user_name varchar2(20) not null, ...
--MUSICBRAINZ set search_path to musicbrainz; --Adding ccolumns to musicbrainz tables alter table release add column cname varchar(max); alter table release_group add column cname varchar(max); --musicbrainz updates update musicbrainz.release set cname = initcap(btrim(split_part(name, ' -', 1))); update musicbrainz.r...
-- Aug 17, 2008 10:49:37 AM CDT -- Multi Change Component INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,Update...
/* Navicat MySQL Data Transfer Source Server : test Source Server Version : 50717 Source Host : localhost:3306 Source Database : srm Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2021-07-10 17:17:17 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
-- DROP TABLE IF EXISTS `tag`; CREATE TABLE `tag` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `tag` varchar(16) NOT NULL, PRIMARY KEY (`id`), UNIQUE key `tag` (`tag`) ) ENGINE = InnoDB DEFAULT CHARSET=UTF8; -- SET FOREIGN_KEY_CHECKS = 1; -- DROP TABLE IF EXISTS `post_tag`; CREATE TABLE `post_tag`( `post...
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 124.205.183.62 (MySQL 5.5.8) # Database: power # Generation Time: 2014-07-22 07:20:51 +0000 # ***********************************************...
create database if not exists rine character set utf8; use rine; create table if not exists `user` ( `id` int unsigned auto_increment, `name` varchar(100) not null unique, `password` varchar(100) not null, `key_n` varchar(2048) not null, `key_e` varchar(100) not null, primary key(`id`) ); create table if ...
/* Navicat Premium Data Transfer Source Server : 192.168.0.51-dev#zfmm Source Server Type : MySQL Source Server Version : 50717 Source Host : 192.168.0.51:3306 Source Schema : db_coc_player Target Server Type : MySQL Target Server Version : 50717 File Encoding : 65001 ...
/*use cinema;*/ DROP TABLE IF EXISTS CustomerSeat; create table CustomerSeat( customerID int, seatID int, roomID int, primary key (customerID, roomID, seatID) ); DROP TABLE IF EXISTS Customer; Create Table Customer( customerID int AUTO_INCREMENT, foodID int DEFAULT NULL, screeningID int NOT NULL, age int NOT...
Create Procedure mERP_sp_List_CSDisplay_CrNotePayoutDefn(@SchemeID Int, @PayoutPeriodID Int) As Begin Select Cus.CustomerID, Cus.Company_Name, "Active" = Case Cus.Active When 1 Then 'Yes' Else 'No' End, Bpay.CapPerOutletID, "Alloc Amount" = Max(Bpay.AllocatedAmount), "Paid Amount" = Max(Bpay.Allocated...
ALTER TABLE VEDTAK_BEGRUNNELSE ALTER COLUMN fom DROP NOT NULL; ALTER TABLE VEDTAK_BEGRUNNELSE ADD COLUMN fk_vilkar_resultat_id BIGINT REFERENCES vilkar_resultat (id);
//////////////////////////////////////////////////////////////////////////////// // // Geo admin tree // MATCH (n:GN_NE) WHERE n.feature STARTS WITH 'A.ADM' RETURN n; // //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////...
CREATE FUNCTION current_state.label_prefix(some_label text) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ SELECT CASE WHEN $1 LIKE '%_/_%' THEN split_part($1, '/', 1) ELSE 'general' END; $_$;
/* Navicat MySQL Data Transfer Source Server : 333 Source Server Version : 50551 Source Host : localhost:3306 Source Database : 1 Target Server Type : MYSQL Target Server Version : 50551 File Encoding : 65001 Date: 2017-11-19 18:54:42 */ SET FOREIGN_KEY_CHECKS=0; -- -------------...
/* Navicat MySQL Data Transfer Source Server : guo Source Server Version : 50140 Source Host : localhost:3306 Source Database : mjgz Target Server Type : MYSQL Target Server Version : 50140 File Encoding : 65001 Date: 2016-08-09 09:03:10 */ SET FOREIGN_KEY_CHECKS=0;...
INSERT INTO departments(name, phone) VALUES ('Отдел разработки', '560001'); INSERT INTO departments(name, phone) VALUES ('Отдел тестирования', '560002'); INSERT INTO departments(name, phone) VALUES ('Отдел продаж', '560003'); INSERT INTO departments(name, phone) VALUES ('Отдел финансов', '560003');
Create Procedure mERP_sp_InsertErrorMessage( @custType nVarchar(255), @ErrorMessage nVarchar(255), @custID nVarchar(255)) As Insert Into tbl_mERP_RecdErrMessages ( TransactionType, ErrMessage, KeyValue, ProcessDate) Values( @custType, @ErrorMessage, @custID, Getdate())
--Provide a query that shows the most purchased Media Type. select m.Name, count(il.TrackId) as Sold from InvoiceLine il, Track t, MediaType m where il.TrackId = t.TrackId and t.MediaTypeId = m.MediaTypeId group by m.MediaTypeId order by Sold desc limit 3
create or replace view v_cg043_zb as ( select t."CZDE411",t."DE281",t."DE284",t."DE282",t."CZDE079",t."DE288",t."DE294",t."JSDE109",t."JSDE960",t."DE051",t."DE052",t."JSDE901",(select to_char(wm_concat (a.jsde902)) new_result from jscs001 a where ','||t.czde079||',' like '%,'||to_char(a.devalue)||',%' and a.dataelement...
-- Provide a query that shows all the Tracks, but displays no IDs. The resultant table should include the Album name, Media type and Genre. SELECT a.Name as TrackName, b.Title as AlbumName, c.Name as MediaType, d.Name as Genre FROM Track as a LEFT JOIN Album as b ON a.AlbumId = b.AlbumId LEFT JOIN MediaTy...
DROP DATABASE `pro_tests`; /* /* DROP TABLE `user_answer`; DROP TABLE `user_resultat`; DROP TABLE `user`; DROP TABLE `answer`; DROP TABLE `question`; DROP TABLE `test`; DROP TABLE `subject`; /**/ -- ----------------------------------------------------- -- Database pro_tests -- ----------------------------------------...
-- -- Update sql for MailWizz EMA from version 1.3.6.4 to 1.3.6.5 --
select `i_brand_id` as `brand_id`, `i_brand` as `brand`, sum(`ss_ext_sales_price`) as `ext_price` from `date_dim` where `d_date_sk` = `ss_sold_date_sk` and `ss_item_sk` = `i_item_sk` and `i_manager_id` = 28 and `d_moy` = 11 and `d_year` = 1999 group by `i_brand`, `i_brand_id` order by `ext_price` desc, `i_brand_id` fet...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.4.3 -- Dumped by pg_dump version 9.4.3 -- Started on 2015-08-31 20:13:00 CST SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messag...
select * from sc_cad.tbl_pce where cd_pce = 15 order by nm_pce; update sc_cad.tbl_pce set vl_pad_pce = '5.90' where cd_pce = 15; select emp.nm_emp as empresa, ctr_pce.* from sc_cad.tbl_ctr ctr inner join sc_cad.tbl_emp emp on ctr.cd_emp = emp.cd_emp inner join sc_cad.tbl_pce_ctr ctr_pce on ctr.cd_ctr = ctr...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 25, 2017 at 06:25 AM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 28, 2021 at 05:36 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SELECT prod_id, quantity FROM OrderItems WHERE quantity = 100 OR prod_id = '^BNBG' ORDER BY prod_id;
/* LATERAL INLINE VIEWS https://oracle-base.com/articles/12c/lateral-inline-views-cross-apply-and-outer-apply-joins-12cr1#lateral-inline-views http://docs.oracle.com/database/121/SQLRF/statements_10002.htm#SQLRF01702 This select is an attempt of joining a table with a query. It raises an error */ SELECT departmen...
SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `data`; CREATE TABLE `data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `district` int(11) NOT NULL, `uik` varchar(10) NOT NULL, `constituency` varchar(64) NOT NULL, `lastname` varch...
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!50503 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 S...
INSERT INTO users (username, password) values ('user','password'), ('admin', 'admin'); INSERT INTO authorities (username, authority) values ('user', 'USER'), ('admin', 'ADMIN');
INSERT INTO D20210128_CLUSTER_RESULT(aid, cluster) VALUES
select task_name , task_target_type , task_target_name from dba_autotask_task where client_name = 'auto optimizer stats collection' /
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Июн 19 2018 г., 10:01 -- Версия сервера: 5.5.60-0ubuntu0.14.04.1 -- Версия PHP: 5.5.9-1ubuntu4.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
CREATE USER PROJETS IDENTIFIED BY projets PROFILE DEFAULT ACCOUNT UNLOCK; GRANT CONNECT, RESOURCE, UNLIMITED TABLESPACE, CREATE VIEW, CREATE SYNONYM TO PROJETS; ALTER USER PROJETS DEFAULT ROLE ALL; COMMIT; exit /
-- question 1, by hospital -- will use this table later, so keep a copy DROP TABLE hospital_score; CREATE TABLE hospital_score (hid INT, average_of_scores FLOAT, sd_of_scores FLOAT, number_of_scores INT); INSERT INTO hospital_score SELECT t.hid, t.average_of_scores, t.sd_of_scores, t.number_of_scores FROM ( SELECT ...
alter table behandling add column kategori varchar(50) default 'NATIONAL'; alter table behandling add column underkategori varchar(50) default 'ORDINÆR';
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 19, 2021 at 03:44 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- 此题难度颇高 -- 回答率最高的问题,action为'answer','answer_id'不能为空 -- 其他情况'show','skip','answer_id'为null -- 找出回答率最高的问题'question_id' -- 其实就是同个问题,'answer' / ('show')的比例 -- 这里有个难点,同个比率时应该同时查出 select * from ( -- 现在网上实现有缺陷,没有考虑相同比例的情况,都是order by desc limit 1直接返回最高一条记录,不正确 select question_id, (sum((case when action = 'answer' then 1 ...