text stringlengths 6 9.38M |
|---|
drop schema unified cascade;
create schema unified;
create table unified.D_labels as select label_id, name from discog.labels;
create table unified.D_releases_labels as select label_id, release_id from discog.releases_labels;
create table unified.D_genres as select genre_id, name from discog.genres;
create table u... |
SELECT
category,
COUNT(category)
FROM
store
GROUP BY
category;
|
-- 레시피 화면
select id, name, small_image_location, calorie, carbohydrate, protein, fat, natrium from food where id = 387;
select * from food_recipe where food_id = 387 order by ord asc;
select * from food_ingredients where food_id = 387;
|
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50532
Source Host : 127.0.0.1:3306
Source Database : dropship
Target Server Type : MYSQL
Target Server Version : 50532
File Encoding : 65001
Date: 2018-07-25 17:05:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 03, 2020 at 08:03 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- 用户表
create table iam_user
(
id bigint comment 'ID' primary key,
tenant_id bigint NOT NULL DEFAULT 0 COMMENT '租户ID',
org_id bigint default 0 not null comment '组织ID',
user_num varchar(20) not null comment '用户编号',
realname varchar(50) ... |
-- no, the tables and field's abbreviations stay: i don't like them too, but i
-- need to avoid both reserved words _and_ backticks nightmares.
-- i'll be forced to use backtitis in the databases inserted, but not in this.
-- obs: with the actual IDEs with colors, make no sense to differentiate
-- anything with upperc... |
-- Lab2
-- John Gnanasekaran
-- ID# 1532263
DROP SCHEMA Lab2 CASCADE;
CREATE SCHEMA Lab2;
CREATE TABLE ChirpUsers (
userID INTEGER PRIMARY KEY,
userPassword CHARACTER(8) NOT NULL,
userName VARCHAR(30) NOT NULL,
joinDate date,
address VARCHAR(30),
education CHARACTER(1),
income DECIMAL(10,2),
s... |
/*a*/
select jc.name from "Jobs".job_category as jc;
/*b*/
select jc."name",COUNT(*) from "Jobs".job j
inner join "Jobs".job_category jc on jc.id = j.job_category_id
inner join "Process".process pc on pc.id = j.process_id
inner join "Recruiter".application_evaluation ae on ae.recruiter_id = pc.recruiter_i
GR... |
# Запрос для добавления информации в БД:
# Существующий список категорий
INSERT INTO
categories
(name,
alias)
VALUES
('Доски и лыжи', 'boards'),
('Крепления', 'attachment'),
('Ботинки', 'boots'),
('Одежда', 'clothing'),
('Инструменты', 'tools'),
('Разное', 'other');
# Запрос для добавления инфо... |
CREATE DATABASE Otomi;
USE Otomi;
CREATE TABLE users(
username varchar(20) NOT NULL PRIMARY KEY,
password varchar(32) NOT NULL,
privilege integer NOT NULL DEFAULT -1,
status integer NOT NULL DEFAULT 1,
name varchar(150) NOT NULL,
email varchar(100) NOT NULL,
other_data varchar(50) NOT NULL... |
select * from transactions,keyword_tag where detail like CONCAT("%",keyword_tag.keyword,"%") AND
|
# 去重,默认是显示全部,distinct去重
select distinct class_id
from student;
# 查询学生表中所有的信息
select *
from student;
# 查询学生表中所有的学号和姓名,别名可以用as 也可以不写
select stu_no as number,stu_name name
from student;
# 统计有多少个学生,聚合函数除了count 还有max min avg sum
select count(*)
from student;
# from,查询学生为曹操的所在的班级是哪个班
select class_name
from student join class... |
CREATE PROCEDURE sp_list_rec_Claims ( @CustomerID nvarchar(15),
@FROMDATE DATETIME,
@TODATE DATETIME)
AS
SELECT ClaimsNoteReceived.ClaimId, ClaimsNoteReceived.ClaimDate,
ClaimsNoteReceived.CustomerID, Customer.Company_Name,ClaimsNoteReceived.ClaimId,
ClaimsNoteReceived.Status,0, ClaimsNoteRece... |
CREATE TABLE todos
"id" serial,
"todos" varchar(255),
"completed" boolean,
primary key("id")); |
DROP TABLE Jumun_detail CASCADE CONSTRAINTS;
DROP TABLE Comments CASCADE CONSTRAINTS;
DROP TABLE CompanyProduct CASCADE CONSTRAINTS;
DROP TABLE Card CASCADE CONSTRAINTS;
DROP TABLE Jumun CASCADE CONSTRAINTS;
DROP TABLE Cart CASCADE CONSTRAINTS;
DROP TABLE Product CASCADE CONSTRAINTS;
DROP TABLE Userinfo CASCADE CONSTRA... |
select trim(rat.nm_rat) as ramo_atividade,
gem.nm_gem as grupo_empresarial,
emp.nm_emp as empresa,
crt.cd_crt as cartao,
cun.nr_cpf_cnpj_cun as cpf,
to_char(hfe.dt_dps_hfe, 'mm/yyyy') as mes,
trim(tdp.nm_tdp) as tipo_deposito,
sum(rdp.vl_dep_rdp) as valor_depositado
fro... |
-- Users(user_id, name, membership_type)
-- DBCC CHECKIDENT (Orders, RESEED, 0)
INSERT INTO Users VALUES('Muhammad Salleh', 'Gold');
INSERT INTO Users VALUES('Joshen Lim', 'Gold');
INSERT INTO Users VALUES('James Ng', 'Silver');
INSERT INTO Users VALUES('Kenneth', 'Silver');
INSERT INTO Users VALUES('Bryan', 'Bronze')... |
--Comment : 주석
/*
SQL 명령을 입력할때 명령이 끝났다라는 것을 알리기 위해 ; 붙여준다.
Ctrl + Enter : 현재 커서가 있는 곳의 명령문을 DBMS로 보내고 결과를 받기
*/
-------------------------------------------------------------------------------
-- select(대소문자 상관없음) 키워드는 from 절을 포함하는 명령문 형태로 작성을 하며
-- DBMS가 보관하고 있는 데이터를 table형식으로 보여달라 라는 명령
-- DBMS의 DML(Databa... |
#standardSQL
SELECT PARSE_DATE('%Y%m%d', '20170714') AS order_date
, order_category
, COUNT(1) AS order_count
FROM `dwprj1.ods3.orders_20*`
WHERE _TABLE_SUFFIX = SUBSTR('20170714', 3)
GROUP BY 1, 2
|
create table pegawai (
id INT PRIMARY KEY AUTO_INCREMENT,
nip VARCHAR(20) NOT NULL,
nama VARCHAR(255) NOT NULL
) Engine=InnoDB; |
CREATE ALIAS IF NOT EXISTS FTL_INIT FOR "org.h2.fulltext.FullTextLucene.init";
CALL FTL_INIT();
CREATE TABLE FILES_INFO(
ID IDENTITY PRIMARY KEY,
PATH VARCHAR(1024),
LAST_MODIFIED_TIME BIGINT,
LAST_MODIFIED_TIME_TEXT VARCHAR(255),
SIZE BIGINT
);
--INSERT INTO PEX (PEX_ID, DEBTOR_FIRST_NAME) VALUE... |
#sql('_getAllSupplierList')
SELECT
id AS gysbm,
company AS gysmc,
(CASE insourceid
WHEN 1
THEN '厂家'
WHEN 2
THEN '经销商'
WHEN 3
THEN '特殊渠道'
ELSE '无' END) AS gyslb,
'T' ... |
CREATE TABLE Users (id SERIAL, firstname varchar, lastname varchar, email varchar, password varchar) ;
INSERT INTO Requests (firstname, lastname, email, password)
VALUES ('Sinmi','John', 'sinmiloluwasunday@yahoo.com','test');
CREATE TABLE Requests (ID SERIAL, title varchar, description varchar, category varchar, image ... |
CREATE TABLE User
(id integer primary key not null auto_increment,
mail varchar(80) UNIQUE,
encrypted_password varchar(80) not null,
salt varchar(10) not null,
facebookmail varchar(30) unique,
firstname varchar(20) not null,
lastname varchar(40) not null,
phonenumber varchar(30),
created_at da... |
CREATE Procedure sp_get_SchemeDetail_rec (@SchemeID INT)
as
Select StartValue,EndValue,FreeValue,FreeItem = Case
When Not Exists(Select Alias from Items Where Alias = schemeitems_rec.freeItem) Then
N'' Else (Select Product_Code from Items Where Alias = schemeitems_rec.freeItem) ... |
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2016 at 03:36 AM
-- Server version: 5.6.25
-- PHP Version: 5.5.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
CREATE DATABASE nodelogin;
USE nodelogin;
CREATE TABLE accounts(
id int(11) NOT NULL AUTO_INCREMENT,
username varchar(50) NOT NULL,
password varchar(255) NOT NULL,
email varchar(100) NOT NULL,
primary key(id)
);
INSERT INTO accounts(id, username, password, email) VALUES (1, 'test', 'test', 'test@test.com');
INSERT I... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 09-Dez-2018 às 04:32
-- Versão do servidor: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-04-2019 a las 16:43:28
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
select
pokemon_types.pokemon_id,
pokemon_name,
pokemon_type,
pokemon_stats.name move_name,
total_damage
from
/data/pokemon_types.csv pokemon_types
join /data/pokemon.csv pokemon_stats on pokemon_types.pokemon_type = pokemon_stats.type
where
pokemon_name = 'Squirtle'
or (
poke... |
<PROBLEMSET 01> JULY 31,2018
SUBMITTED BY nivetha.seenivasan
Hotel (Hotel_No, Name, City)
create table Hotel(Hotel_No text PRIMARY KEY,Name text,City text);
Insert into Hotel values('H111','Empire Hotel','New York');
Insert into Hotel values ('H235','Park Place','New York');
Insert into Hotel values('H... |
CREATE TABLE players (
P_ID INTEGER PRIMARY KEY AUTOINCREMENT,
first_name varchar,
last_name varchar,
birth date,
country varchar,
height decimal,
weight decimal,
photo blob,
team_id INTEGER);
CREATE TABLE goals (
G_ID INTEGER PRIMARY KEY AUTOINCREMENT,
minute time,
player_id INTEGER,
matc... |
--ALTER VIEW BG_Shipping_$_And_Lbs_By_Loc AS
--Created: 05/11/12 By: BG
--Last Updated: 5/11/12 By: BG
--Purpose: Report for shipping $ and lbs by location
--Last Change: --
SELECT OH.ord_no,
CASE WHEN MAX(PP.LOC) IS NULL THEN MAX(OL.loc)
ELSE MAX(PP.loc)
END AS LOC,
CASE WHEN (SUM(pp.weight... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50712
Source Host : localhost:3306
Source Database : BoJu
Target Server Type : MYSQL
Target Server Version : 50712
File Encoding : 65001
Date: 2016-10-17 12:45:39
*/
SET FOREIGN_KE... |
select count(distinct `c1`) as `cnt`
from `empty` |
-- Jul 29, 2008 4:04:35 PM CDT
-- Default comment for updating dictionary
UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=130,Updated=TO_DATE('2008-07-29 16:04:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56179
;
-- Jul 29, 2008 4:05:00 PM CDT
-- Default comment for updating diction... |
select
wk,
count(*)
from
bitmp.tmamiya_order_defect_customer_segmentation_pre
group by 1 |
truncate table cir.direction_map;
truncate table cir.location_map;
truncate table cir.contact_call;
truncate table cir.contact_status;
truncate table cir.contact;
truncate table cir.apps_report_parameter;
truncate table cir.apps_report;
truncate table cir.possible_value;
truncate table cir.meeting_place;
trun... |
/*USE beadndo_o09ctq;*/
/*1,*/
SELECT alkalmazott.Nev
FROM alkalmazott
INNER JOIN bolt ON bolt.UzletID=alkalmazott.UzletID
WHERE alkalmazott.UzletID='002';
/*2,*/
SELECT bolt.Telefonszam FROM bolt WHERE bolt.Varos='Budapest';
/*3,*/
SELECT COUNT(jatekszoftver_raktar.Minoseg) FROM jatekszoftver_raktar WHERE jatekszof... |
###文章分页查询 带模糊查询功能
#sql("getPage")
SELECT * FROM dms_article
WHERE (
dms_article.title LIKE #para(searchKey)
)
AND
dms_article.create_time BETWEEN #para(dateStartStr) AND #para(dateEndStr)
#if(sortName!=null)
ORDER BY #(sortName)
#(sortOrder)
#else
ORDER BY create_time
DESC
#end
#end... |
# INSERT INTO Vehicle VALUES('JDO682', '90JERN34F9DF3450F', 'Holden', 'Commodore', 2008, 5, 'Petrol', NULL, 'C');
# INSERT INTO Vehicle VALUES('AKJ424', '8Y2340JDSNKL9HGS9', 'BCI', 'Fleetmaster 55', 2010, 87, 'Diesel', 'Fire extinguisher, 5 tents, 3 kayaks', 'MR');
# INSERT INTO Vehicle VALUES('EIU112', 'SPG4VLEHSDZ98... |
create schema if not exists `test-backend-vinicius`;
use `test-backend-vinicius`;
create table if not exists months (
id_month tinyint unsigned primary key auto_increment,
name varchar(30) not null
);
create table if not exists categories (
id_category tinyint unsigned primary key auto_increment,
nam... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 11 mai 2021 à 20:13
-- Version du serveur : 10.4.17-MariaDB
-- Version de PHP : 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
/*==============================================================*/
/* DBMS name: Sybase SQL Anywhere 12 */
/* Created on: 2020/7/13 20:47:30 */
/*==============================================================*/
if exists(select 1 from sys.sysforeignkey where ro... |
-- Deletar o processo da lista de histórico
DELETE HP.* FROM `tb_historico_processo` HP
INNER JOIN `tb_cad_protocolo` CP ON (`CP`.`id_cad_protocolo` = HP.`id_cad_protocolo`)
WHERE
CP.NUM_PROCESSO = '9243900/2004';
DELETE CP.* FROM `tb_cad_protocolo` CP
WHERE
CP.NUM_PROCESSO = '9243900/2004'; |
script card.js
set sqlformat card
select * from hr.employees;
|
-- Mangler mange felter i "Observation"
CREATE TABLE Observation
(
id uniqueidentifier NOT NULL PRIMARY KEY,
[status] nvarchar(255) NOT NULL,
code_CodeableConcept uniqueidentifier NOT NULL FOREIGN KEY REFERENCES CodeableConcept(id),
subject_Reference uniqueidentifier FOREIGN KEY REFERENCES Reference(id)
-... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 10, 2017 at 04:58 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
Create procedure sp_get_GRNItems_RecdInvoice_MUOM(@GRN_ID int)
as
select Batch_Products.Product_Code as "Code", Items.ProductName as "Name",
Batch_Products.UOMQty as "Qty",
Case IsNull(Batch_Products.Free, 0) When 1 Then 0 Else IsNull(dbo.sp_get_recd_invoice_batchdetails_MUOM(GRNAbstract.RecdInvoiceID,
Batch... |
CREATE SEQUENCE IF NOT EXISTS "WithNan_id_seq";
CREATE TABLE "public"."WithNan" (
"id" int4 NOT NULL DEFAULT nextval('"WithNan_id_seq"'::regclass),
"num" float8 NOT NULL,
PRIMARY KEY ("id")
);
INSERT INTO "public"."WithNan" ("id", "num") VALUES
('1', '1'),
('2', 'NaN');
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 16, 2019 at 06:44 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 14, 2018 at 05:44 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `artworkio`
--
-- --------------------------... |
select gobun, goname, gotel
from gogek
where regexp_like (goname, '^.¹Î');
select gobun, goname, gotel
from gogek
where regexp_like (gotel, '[7]{2}');
|
alter table employee add accountNumber varchar(50);
alter table employee add bankCode varchar(50);
|
//REGLA DE NEGOCIO 4
BEGIN
PRUEBAS_PRODUCTOS.INICIALIZAR;
PRUEBAS_STOCKPRODUCTOPUBLICO.INICIALIZAR;
PRUEBAS_STOCKPRODUCTOALMACEN.INICIALIZAR;
DELETE FROM LINEAFACTURA;
ADD_STOCKPRODUCTOPUBLICO(10, 0);
ADD_STOCKPRODUCTOALMACEN(NULL,NULL,NULL);
ADD_PRODUCTO(1234,'QUESO','SECO',4.55, '31', '6');
ADD_LINEAFACTURA(4.55,1,... |
LOAD CSV WITH HEADERS FROM "file:///person_groups.csv" AS row
MERGE (group:Entity:Org:Group { name: row.group })
WITH group, row
MATCH (person:Entity:Org:Person { id: row.login })
CALL apoc.merge.relationship(person, row.relation, {}, {}, group) YIELD rel
RETURN rel
|
drop database if exists FitnessDatabase;
create database FitnessDatabase character set utf8mb4;
use FitnessDatabase;
create table Klijent(
sifra int not null primary key auto_increment,
Ime varchar(20) not null,
Prezime varchar(20) not null,
Spol char(1) not null,
Dob int(2) not null,
... |
CREATE OR REPLACE VIEW V_YZZFCGBYJSDE107 AS
(
SELECT JSDE107,SUM(DE181) AS ZFCGJE FROM ZB006MX
WHERE CZDE012=1
GROUP BY JSDE107);
|
INSERT INTO burgers (burger_name)
VALUES ('Double Original Cheese Burger'),
('Lean Beef Sliders on Sourdough'),
('Southwest Black Bean Burger with Special Sauce'),
('Philly Cheese Steak Burger'),
('Portabella Delite Burger'); |
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone` varchar(20) NOT NULL,
`email` varchar(255) NOT NULL,
`nick_name` varchar(40) NOT NULL,
`password` varchar(255) NOT NULL,
`real_name` varchar(255) NOT NULL... |
CREATE TABLE `hint` (
`hintid` int(11) NOT NULL AUTO_INCREMENT,
`xcoord` int(11) DEFAULT NULL,
`ycoord` int(11) DEFAULT NULL,
`distance` double DEFAULT NULL,
`imageurl` varchar(100) DEFAULT NULL,
PRIMARY KEY (`hintid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
CREATE TABLE clientebola(
codigo int default(nextval('bola'))
);
|
select pos.title, ccppt.* from company_candidate_position_position_types ccppt with(NOLOCK)
join position_position_types ppt with(NOLOCK) on (ccppt.Position_Position_Type_Id=ppt.Position_Position_Type_Id)
join positions pos with(NOLOCK) on (ppt.position_id=pos.Position_Id)
where ccppt.company_candidate_id = 38046405
... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-11-2016 a las 15:06:46
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
CREATE TABLE `shipments` (
`id` varchar(36) NOT NULL,
`shipment_number` varchar(100) NOT NULL,
`sender_id` varchar(36),
`recipient_id` varchar(36),
`route_id` varchar(36) DEFAULT NULL,
`arrival_delayed` tinyint(1) unsigned NOT NULL DEFAULT '0',
`departure_delayed` tinyint(1) unsigned NOT NULL DEFAULT '0',... |
/*Part 1*/
/*1. How many country in each continent, have life expectancy greater than 70?*/
USE world;
SELECT country.Continent AS continent, count(country.Continent) AS total_country, country.LifeExpectancy as life_expectancy FROM country
WHERE LifeExpectancy > 70
GROUP BY Continent;
/*2. How many country in each c... |
-- SQL is intended for postgres SQL
-- initial user is:
-- username: meiben
-- password: Eiben1
DROP TABLE IF EXISTS "user";
CREATE TABLE "user" (
id serial PRIMARY KEY,
username varchar(50) NOT NULL,
name_first varchar(50) NOT NULL,
name_last varchar(50) NOT NULL,
password_hash varchar(255) NOT N... |
/*
工厂付款
*/
delimiter $
drop trigger if exists Tgr_Payments_AfterInsert $
create trigger Tgr_Payments_AfterInsert after insert
on Payments
for each row
begin
/*定义变量*/
declare sNewID varchar(255);
set sNewID=new.ID;
call Proc_ApplyForPayments_Payments_UnPaiedAmount(sNewID);-- 付款申请-工厂付款
end$
delimiter ; |
/*
Navicat Premium Data Transfer
Source Server : lokal
Source Server Type : MySQL
Source Server Version : 100411
Source Host : localhost:3306
Source Schema : huda
Target Server Type : MySQL
Target Server Version : 100411
File Encoding : 65001
Date: 09/05/2020 00:51:1... |
-- Put phone number in 3rd values' slot below if you'd like to test out the text reminders feature.
INSERT INTO users (username, password, phone_num) VALUES ("user1", "password", 1234567890);
INSERT INTO users (username, password) VALUES ("user2", "password");
INSERT INTO posts (user_id, main_content, addl_content, ... |
INSERT INTO public.groups VALUES('assessmentuser');
INSERT INTO public.users_groups VALUES('admin','assessmentuser');
|
select posts.*, users.user_name, users.profile_img
from posts
join users on users.user_id = posts.users_id
order by post_likes desc
limit 4; |
CREATE SEARCH INDEX if not exists ON bank.customer with columns address_line1
,city
,email_address
,first_name
,full_name
,last_name
,middle_name
,government_id
,government_id_type
,phone_numbers
... |
# patch_48_49_c.sql
#
# title: regulatory_support_removal
#
# description:
# regulatory tables to be removed from database (now done by func gen)
DELETE object_xref FROM object_xref where ensembl_object_type = "regulatory_factor";
DELETE object_xref FROM object_xref where ensembl_object_type = "regulatory_feature";
A... |
/*
SQLyog Community v13.0.1 (64 bit)
MySQL - 5.7.19 : Database - gruhudhyog
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FORE... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: mobileonline
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... |
/*
Name: Home Hero Impressions by Branch june 21
Data source: 4
Created By: Admin
Last Update At: 2016-06-23T17:49:16.740839+00:00
*/
SELECT H_Lis.marketingGroup_name AS Marketing_group,
H_Lis.brokerage_name AS Brokerage,
nvl(H_Lis.agent_name,"--") AS Agent,
H_Lis.branch_name AS Branch,
H_Li... |
{% macro ref(model_name) %}
{% set dbt_model_test_enabled = env_var('DBT_MODEL_TEST_ENABLED', False) %}
{% set dbt_model_test_identifier_prefix = env_var('DBT_MODEL_TEST_IDENTIFIER_PREFIX', '') %}
{{ log("Running custom:ref " ~ model_name) }}
{% if dbt_model_test_enabled == '1' %}
{{ log("DBT_MODEL_TEST: ... |
DROP procedure IF EXISTS `bsp_editar_cliente`;
DELIMITER $$
CREATE PROCEDURE `bsp_editar_cliente`(
pIdCliente int,
pApellidos varchar(60),
pNombres varchar(60),
pDNI int(11),
pFechaNac date,
pEmail varchar(50),
pTelefono varchar(30),
pDireccion varchar(45),
pCiudad varchar(45),
pProvincia varchar(45),
pSexo CHAR(1),
pC... |
/*
Navicat MySQL Data Transfer
Source Server : charles
Source Server Version : 50534
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50534
File Encoding : 65001
Date: 2014-07-05 12:09:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
USE test;
INSERT INTO login (username) VALUES ('jean.dupond@gmail.com');
|
USE ECommerce;
INSERT INTO Lojas (NomeLoja)
VALUES ('SENAI Store');
INSERT INTO Categorias (NomeCategoria, IDLoja)
VALUES ('Cursos', 1), ('Acessórios', 1);
INSERT INTO Subcategorias (NomeSubcategoria, IDCategoria)
VALUES ('Informática Básica', 1), ('Desenvolvimento', 1), ('Meio Ambiente', 2);
INSERT INTO Produtos (... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.4
-- Dumped by pg_dump version 10.4
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... |
REM ------------------------------------------------------------------------
REM REQUIREMENTS:
REM SELECT on dba_ tables
REM ------------------------------------------------------------------------
REM PURPOSE:
REM Show tablespace files
REM ------------------------------------------------------------------------
... |
INSERT INTO solution_type(solution_type_id, description, title) VALUES (0, 'Builder', 'Builder');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (1, 'Bricklayer', 'Bricklayer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (2, 'Carpet Fitter', 'Carpet Fitter');
INSER... |
REGISTRATION:
-------------
CREATE TABLE ADMINS
(
ADMIN_ID BIGINT(10) NOT NULL,
EMAIL_ID VARCHAR(50) NOT NULL,
PWD VARCHAR(50) NOT NULL,
STATUS INT(1) NOT NULL,
IS_FTL INT(1) NOT NULL,
CREATED_BY BIGINT(10) NULL,
CREATED_DATE BIGINT NULL,
MODIFIED_BY BIGINT(10) NULL,
MODIFIED_DATE... |
library ChronicPainConcepts version '1.0.0'
// ## Value sets ##
// List value sets used by the artifact. The links to the Value Set Authority Center (VSAC) point to the latest
// expansion of each value set available.
// [See value set in VSAC](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1032.37/expansio... |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `bird_system` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `bird_system`;
CREATE TABLE IF NOT EXISTS `birdhistory` (
`round` int(11) NOT NULL,
`player1` int(11) NOT NULL,
`player2` int(11) NOT NULL,
... |
UPDATE npc_template SET gfxID=10020,sex=0 WHERE id=40009; |
CREATE TABLE [Staging].[TradeHistory] (
[PortfolioID] INT NOT NULL,
[BrokerID] INT NOT NULL,
[Code] NVARCHAR(10) NOT NULL,
[Company] NVARCHAR(255) NOT NULL,
[Type] NVARCHAR(10) NOT NULL,
[Quantity] INT NOT NULL,
[UnitPrice] DECIMAL NOT NULL,
[TradeValue] DECIMAL NOT NULL,
[Br... |
--student: Diana Rachvak
--1. What are the top ten countries by economic activity (Gross National Product - ‘gnp’).
SELECT gnp AS top_ten_gnp FROM country ORDER BY gnp desc LIMIT 10;
--2. What are the top ten countries by GNP per capita?
SELECT gnp AS top_gnp_per_capita FROM country
ORDER BY gnp/NULLIF(population,... |
CREATE DATABASE `employeedb` /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE TABLE `employee` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`department` varchar(100) NOT NULL,
`phone` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
-- phpMyAdmin SQL Dump
-- version 4.7.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 04, 2019 at 06:29 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
create database ashmishop;
use ashmishop;
Create table user(
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name varchar(40),
email varchar(40),
pass varchar(40)
);
create table products(
id int unsigned auto_increment primary key,
product_name varchar(40),
price float,
product_detials varchar(255... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_GetSupportingDocument]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[prc_CWI_GetSupportingDocument]
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].[pr... |
----Éó¼ÆÏà¹Ø±í
create or replace view v1_xtyskm as
select
de011 ysnf ,
2 lx ,
jsde040 kmlx,
de082 kmdm,
de081 kmmc,
0 dwid ,
0 dwbs ,
0 qzbs ,
jsde017 jbbs,
jsde901 pyzjf,
0 kmtjbz
from cs081
union
select
de011 ysnf ,
4 lx,
jsde040 kmlx ,
de084 kmdm ,
de083 kmmc,
0 dwid,
0 dwbs ,
0 qzbs ,
jsde017 jbb... |
USE sakila;
-- 1. Utilizando a tabela sakila.payment, monte uma function que retorna a quantidade total de pagamentos feitos até o momento por um determinado customer_id.
DELIMITER $$
CREATE FUNCTION RetornaTotalDePagamentoDeUmCliente(id INT)
RETURNS DECIMAL READS SQL DATA
BEGIN
DECLARE total DECIMAL;
SELECT COUN... |
-- These are gotten from the Parent Form ... spreadsheet that Janice sent:
-- this file should be idempotent.
-- use autoapp_test;
-- need to have Hugh in the system.
insert into `user`(user_id, full_name, email) values(7, 'HughKB', 'hugh@domain.com')
on duplicate key update email = email;
-- this is the only conf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.